2012-01-05 52 views
2

是他們在Facebook上分享鏈接的任何其他php代碼。我使用此代碼在Facebook牆上分享鏈接。使用Graph API在Facebook牆上分享鏈接的另一種方法

$ret_obj = $this->facebook->api('/me/feed', 'POST', array(
             'link' => 'www./excample.com', 
             'message' => 'Posting with the PHP SDK!' 
           )); 
echo '<pre>Post ID: ' . $ret_obj['id'] . '</pre>'; 
+0

爲什麼這種方法不適合您的需求? – nav 2012-01-05 11:30:25

+0

如果我使用此代碼,內容將寫在我的牆上,但它不會顯示在我的朋友提要 – Warrior 2012-01-05 11:55:44

回答

5
Instead of `feed` use `links` 


$ret_obj = $this->facebook->api('/me/links', 'POST', array(
              'link' => 'www./excample.com', 
              'message' => 'Posting with the PHP SDK!' 
            )); 
相關問題