Reputation: 1920
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);
so the question is how to get the post_id after posting it?
Upvotes: 0
Views: 5014
Reputation: 2052
The Post's id is stored in $result['id']
.
It's the return value of the call to feed
; this is also the case for /links
, /photos
, etc.
Ref: http://developers.facebook.com/docs/reference/php/facebook-api/
Upvotes: 6
Reputation: 52093
Check the value in the $result variable, that should be the actual post_id value.
Upvotes: 0