开发者

Depending on event-status show attending-button

开发者 https://www.devze.com 2023-04-03 08:39 出处:网络
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

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:

  1. you have to have the rsvp_event permission for that user, and
  2. 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

0

精彩评论

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