How to make a user subscribe to an event in facebook using Graph API?

我的未来我决定 提交于 2019-12-01 08:14:46

问题


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


回答1:


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"));


来源:https://stackoverflow.com/questions/4861870/how-to-make-a-user-subscribe-to-an-event-in-facebook-using-graph-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!