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 an Event

Problem

I need to retrieve a Facebook event using FQL.

Solution

If you have the eid (event ID) of the event, this is easy:

SELECT eid, name, pic_small, description, start_time,
 end_time, location FROM event WHERE eid = $eid;

You can, of course, SELECT a different set of fields.

Discussion

The only place you can get an eid using FQL is from the event_member table (see Event Member Table). This query will only return events that the current loggedinuser has permission to see.

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