如何让用户使用Graph API订阅facebook中的活动?
问题描述:
I would like to users when added to this website event registration also subscribe to the event in the facebook.
The system is already asking for the "create_event" extra permission, I am not finding how to subscribe the user to a particular event after it logged in by graph api. How can I do that?
Thanks,
Joe
我想向用户添加到本网站时,事件注册也会在facebook上订阅该活动。
系统已经要求“create_event”额外权限,我没有找到如何在用图形api登录后订阅用户到特定事件。 我该怎么办? p>
谢谢,
Joe p>
div>
答
It's documented in the event
object page:
// RSVP to an Event
curl -d "access_token=XXX"
https://graph.facebook.com/EVENT_ID/{attending|declined}
So you need to grant the rsvp_event
permission.
Example using the php-sdk:
$facebook->api("/EVENT_ID/attending", "post", array("access_token" => "XXXXX"));