Sander Goossens
Sander Goossens

Reputation: 11

Facebook FQL or graph API events

I'm trying to develop an application wich will get all the facebook events and show it on a iphone application.

My question is what is the best way to retrieve all the public facebook events in PHP. I know there is the FQL and the open graph api but with FQL I cannot retrieve just all the public events and I can't seem to find a way to do this.

Can somebody help me with this ?

Kind regards !

Upvotes: 1

Views: 673

Answers (1)

JHAWN
JHAWN

Reputation: 399

Both FQL and the Graph Api work well. Both are great options.

FQL:

  • FQL may be faster if you want to get all the events from all a user's friends.
  • FQL has a method of getting the count of attendees, maybes, not attendings, and "no replies" directly, without having to count yourself, which saves LOTS of time when dealing with 20,000 people concerts etc. [ IF you want to calculate the gender ratios, unfortunately then this feature wont help you much ]
  • FQL has a method of determining who was invited by whom, called "inviter" from the "event_member" table, though it appears to be presently broken: Finding who INVITED you :: Facebook FQL Explorer Bug: "Inviter":null
  • If you are using FQL, you can use "privacy" to determine if the event is public.
  • SELECT name, venue, location, start_time FROM event WHERE eid in (SELECT eid FROM event_member WHERE uid=me())

The Graph: - You used to check "privacy" for the privacy of an event. It is now depreciated and I believe it doesn't matter now, because only the events you have access to will show up.

  • $JSON = $facebook->api('/'.$target.'/events?fields=name,venue,location,start_time,description,picture.type(large),attending.fields(gender)&since='.time());

TIP: IF your program should show events for one specific region, can use an app's authentication rather than nag a user to log in and approve your app ( unless you have special customizations for each user).

Upvotes: 1

Related Questions