0

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?

2 Answers 2

6

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/

0

Check the value in the $result variable, that should be the actual post_id value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.