开发者

how to post on a facebook event wall?

Im new at facebook app development and I am trying to make an automatic post on an event wall. I have read that include the id to post on a specific wall. I have tried that but it doesn't work.

I thought that maybe it would work with "to" (a specific targeted wall), but I don't know it's syntax...

can anyone hel开发者_C百科p? or at least give an example of a post syntax with a "to" property included... plssss...


$attachment = array(
                'message' => 'this is my message',
                'name' => 'This is my demo Facebook application!',
                'caption' => "Caption of the Post",
                'link' => 'http://mylink.com',
                'description' => 'this is a description',
                'picture' => 'http://mysite.com/pic.gif',
                'actions' => array(array('name' => 'Get Search',
                'link' => 'http://www.google.com'))
                );
$uid = ""; //friend id OR "me"
$result = $facebook->api('/'.$uid.'/feed/','post',$attachment);

  • http://developers.facebook.com/docs/reference/api/post/

NOTE: you should have the user publish_stream extended permission and you should have the SDK Lib loaded.


$attachment = array(
                'message' => 'this is my message'
                );
$eid = ""; //event id
$result = $facebook->api('/'.$eid.'/feed/','post',$attachment);

http://developers.facebook.com/docs/reference/api/event/ <-- event object documentation

or

https://api.facebook.com/method/stream.publish?message=<your_message>&target_id=<event_id>&access_token=<your_token>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜