O'Reilly logo

Facebook Cookbook by Jay Goldman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required