Reputation: 1128
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.
Upvotes: 4
Views: 2479
Reputation: 22903
Your query is ok.
LIMIT 20
for example if your query takes a took long time,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'});
Upvotes: 2