Depending on event-status show attending-button
I've built a check for current rsvp_status for an event and the currently logged in member. Now I'd like to show an I'm attending button depending on someone's status. I can work out the HTML for the different buttons depending on their RSVP-status, but what I'm not sure of is how to write someone's rsvp_status back into the Graph after clicking the 开发者_JAVA技巧"I'm attending" button... Can you guys give me a push in the right direction?
Thanks!
Steven
You can post back attending status, this requires two things:
- you have to have the rsvp_event permission for that user, and
- you have to call
FB.api(eventID+'/attending', 'post', function(resp) { // true if the rsvp was successfull })
This will check the user in the event.
For more info, see Graph API
精彩评论