facebook - Graph API: event's RSVP check -


i'm trying idea of getting facebook's rsvp event, stuck on part:

as see now, user's rsvp have make 3 requests following logic:

 request eventid/attending/userid ->    if "data" array count == 0 ->    request eventid/maybe/userid ->    if "data" array count == 0 ->    request eventid/declined/userid   else -> means user didn't make choice previously. 

so here looks have make 3 requests facebook's graph api users's rsvp single event.

the question if there way rsvp status event doing single request?

i'm using latest facebook sdk , latest graph api.

many in advance.

so best solution here far is:

  • one request /eventid/attending/userid
  • one request /eventid/maybe/userid
  • one request /eventid/declined/userid (if needed know if event invitation declined)

call eventid/attending(maybe/declined)/userid lets filter rsvp single user, avoid downloading , processing large amount of data here.

after call have 2 options:

  1. if result true, following response:

{ "data": [ { "name": "oleskii poplavlen", "id": "10204715567996406", "rsvp_status": "attending" } ]}

  1. if result false, following response:

{ "data": [] }

so while still have make multiple requests user's rsvp event, can avoid downloading loads of other users's rsvps.

hope helps someone!


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -