2

我正在尝试使用 Graph API 在经过身份验证的用户的墙上发帖。

我面临的问题是当我尝试分享帖子时,例如

http://www.facebook.com/surendrakumar.in/posts/486644641373819

对用户提要使用 Graph API

$story_url = "http://www.facebook.com/surendrakumar.in/posts/486644641373819"
$ret_obj = $facebook->api('/me/feed', 'POST',
array(
 'access_token' => $fb_access_token,
 'link' => $story_url,
 'message' => ($msg != "" ? $msg : "")
));

然后,在 Facebook 上分享的帖子只是一个链接,这不是预期的。

预期的 :

使用http://www.facebook.com/surendrakumar.in/posts/486644641373819链接和帖子、预览等详细信息在墙上发布。

实际的:

只发布了一个链接。没有预览和任何其他信息。

4

1 回答 1

0

将链接放在消息文本中。

IE:

$story_url = "http://www.facebook.com/surendrakumar.in/posts/486644641373819"
$ret_obj = $facebook->api('/me/feed', 'POST',
array(
 'access_token' => $fb_access_token,
 'message' => ($msg != "" ? $msg."\n".$story_url : "".$story_url)
));
于 2012-12-13T15:03:08.870 回答