Checking for event-rsvp status and showing disabled/enabled RSVP-button

后端 未结 3 658
日久生厌
日久生厌 2021-01-15 02:23

I\'m still a bit unsure how I would find this in the documentation, but I\'d like to check whether the logged-in user has RSVP\'ed to an fb-event or not, and show the \"I\'m

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-15 03:12

    You can query the event_member FQL table, something like:

    FB.api(
        {
            method: 'fql.query',
            query: 'select rsvp_status from event_member where eid = "EVENT_ID" and uid=me()'
        }, function(response) {
            alert(response[0].rsvp_status);
        }
    );
    

    Would return (alert) something like: declined

提交回复
热议问题