Retrieving a User’s Events

Problem

I need to retrieve a specific user’s Facebook events using FQL.

Solution

Retrieving all of a specific user’s events is easy:

SELECT eid, rsvp_status FROM event_member WHERE uid = $uid

Discussion

Keep in mind that this will return events only if the current loggedinuser is allowed to see them. If you query for a user that the loggedinuser isn’t friends with, you’ll get an empty results set.

Get Facebook Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.