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 Events Created by a User

Problem

I need to retrieve all of the Facebook events created by a specific user using FQL.

Solution

SELECT eid, name, pic_small, description, start_time,
 end_time, location FROM event WHERE creator = $user AND eid IN (SELECT eid
 FROM event_member WHERE uid = $user);

Discussion

This will return content only if the current loggedinuser can see the events of the user specified in $user.

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