如何检索我刚通过Facebook API发布的帖子的帖子ID
问题描述:
我正在使用以下代码发布到页面的 Feed
连接
i am using the following code to publish to a Page's feed
connection
$attachment = array('message' => 'xxxxxxxxxxxxxxxxx',
'name' => 'cccccccccccccccc',
'caption' => 'cccccccccccccccc',
'link' => 'http://apps.facebook.com/manydldotnet/',
'description' => "ccccccccccccc",
'picture' => "'cccccccccccccccc'",
'actions' => array(array('name' => 'Download!','link' => 'http://apps.facebook.com/manydldotnet/'))
);
$result = $facebook->api('/121468571287906/feed/','post',$attachment);
所以问题是如何发布post_id后呢?
so the question is how to get the post_id after posting it?
答
邮政编号存储在 $ result ['id']
。
这是调用 feed
的返回值; / links
, /照片
等。
It's the return value of the call to feed
; this is also the case for /links
, /photos
, etc.
参考: http://developers.facebook.com/docs / reference / php / facebook-api /