Issue
I would like to get attending guests count from event using Facebook Graph API v2.1. I can't use FQL Query becouse it is deprecated after current version.
I can use /{event-id}/attending and sum all guests but this solution is very ineffective (queries are performed for a long time - usually >2000ms and it work only for ~1000 guests, not more).
Solution
If you make a call to the Event ID itself, you can add fields for attending_count
, declined_count
and maybe_count
to get the totals easily.
Example:
https://graph.facebook.com/{event_id}?fields=attending_count,declined_count,maybe_count
If I do the following:
https://graph.facebook.com/468185256651918?fields=attending_count,declined_count,maybe_count
I see:
{
"attending_count": 304,
"declined_count": 277,
"maybe_count": 97,
"start_time": "2014-09-06T20:00:00+0100",
"id": "468185256651918"
}
Answered By - Niraj Shah
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.