2010-11-09 152 views
1

我正在開發一個娛樂網站。現在客戶希望當用戶上傳任何視頻或圖像或任何trake時,通知應該在facebook新聞提要上發送。我曾嘗試是--- 我的PHP代碼: -在Facebook上發表評論newsfedd

$attachment = array('message' => 'this is my message', 
       'name' => 'This is my demo Facebook application!', 
       'caption' => "Caption of the Post", 
       'link' => 'http://mylink.com', 
       'description' => 'this is a description', 
       ); 
$attachment = json_encode($attachment); 
$result = $facebook->api('/me/feed/','post',$attachment); 

,但它給出facebook.php錯誤,我從 https://github.com/facebook/php-sdk

回答

0

downloded您應該指定一個帆布網址Facebook的應用程序,你正在使用聯合開發。然後,您的鏈接應該與此畫布網址共享一個根URL。

相關問題