Question

I try to get a list of all events attended by all friends on facebook. Here is the query:

SELECT name, venue, location, start_time, eid FROM event 
WHERE eid IN (
       SELECT eid FROM event_member 
       WHERE (uid IN (SELECT uid2 FROM friend WHERE uid1 = me())  OR uid = me())
   )
AND start_time > now()

Although I can see my friends attending certain events on facebook.com/events/list, the result of the FQL query is an emtpy array.

Does anyone have an idea why?

Thanks.

Update:

I've added the user_events and friends_events permissions as suggested in the first answer, but the returned list is still empty.

Was it helpful?

Solution

Your query is ok.

  • Just add LIMIT 20 for example if your query takes a took long time,
  • Add the user_events and friends_events permissions.

Doc: https://developers.facebook.com/docs/reference/fql/event_member

Update:

Permissions should be set in the cloud & then requested on login from your client. Here is the login:

FB.login(callback, {scope: 'user_events,friends_events'});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top