简体   繁体   中英

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 help? 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);


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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM