-1

在将帖子分享到我的墙上时,我获得了完整帖子的链接,而我只想显示共享帖子标题和图像的 URL。除链接部分外,一切正常。

$result = $facebook->api('/me/feed/', 'post',
    array('name' => $_POST['title'], 
          'link' => 'http://myurl.com', 
          'picture' => $_POST['imgPath'], 
          'caption' => 'post title', 
          'description' => $_POST['description']));     

请建议。

4

1 回答 1

0
Try by removing '/' after feed ..
$result = $facebook->api('/me/feed', 'post',
    array('name' => $_POST['title'], 
          'link' => 'http://myurl.com', 
          'picture' => $_POST['imgPath'], 
          'caption' => 'post title', 
          'description' => $_POST['description']));    
or you can use userid instead of me..
$user=$facebook->getUser();
$result = $facebook->api('/$user/feed', 'post',
    array('name' => $_POST['title'], 
          'link' => 'http://myurl.com', 
          'picture' => $_POST['imgPath'], 
          'caption' => 'post title', 
          'description' => $_POST['description']));    
于 2012-07-18T07:38:13.010 回答