2013-04-07 136 views
2

我正在閱讀Facebook的新API(opengraph)已經改變了,我正在嘗試發佈一些東西並在它上面貼上幾個朋友......根據這個https://developers.facebook.com/docs/reference/api/user/#posts我應該指定「tags」部分的id,但不是工作,我見過一些參考,但都是舊的...如何在Facebook上發帖並標記好友和地點?

問題是,它確實發佈在牆上,但沒有標記或顯示的地方。

我爲此使用了php。

任何人都這樣做?

這是我的代碼

$post = array('message' => 'my message ', 
       'name' => 'name', 
       'caption' => "something", 
       'link' => 'my page', 
       'description' =>"some desc", 
     'place' => '323816477724410',<--- id of a city 
       'tags' => 'xxxxxx', <---- facebook id 

       );  
$result = $facebook->api("/".$user."/feed/", 'post', $post); 

回答

-1

請檢查錯誤日誌。將代碼放在try {} catch {}中,並打印異常數組,如下所示:

try{ 
    $result = $facebook->api("/".$user."/feed/", 'post', $post); 
} catch (FacebookApiException $e) { 
    print_r($e); // or error_log($e); 
} 
相關問題