2012-07-17 60 views
-1

將帖子分享到我的牆上時,我獲得完整帖子的鏈接,而我只想顯示共享帖子標題和圖片的網址。一切工作正常,除了鏈接部分。Facebook分享後 - 限制只有標題和圖片的URL

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

請建議。

+0

我不明白你到底在問什麼。 – CBroe 2012-07-17 13:55:11

+0

@CBroe其實,如果你在牆上看到任何共享帖子,你會發現鏈接只在標題和縮略圖上,但在我的情況下,它鏈接到完整的帖子。 – Nehrav 2012-07-17 14:08:37

+0

@CBroe [鏈接] http://www.facebook.com/HyperArtsTests?sk=app_198144043559967檢查對話框出現點擊分享 – Nehrav 2012-07-17 14:11:11

回答

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']));