Facebook API – User Events

This a follow-up of my recent article about reading the guest list of a Facebook Event created through Facebook Pages. If you want to get the Events (and the attendees) of a User, it´s a bit more work. You need to authorize the User with the permission “user_events”, and you will still just get the Events the user is attending too with the “/events” connection. I spare you the details of creating an app, this is just the authorization code for the PHP SDK:

Let´s get the events

Here´s how to get the Events of a Facebook Page:

Getting the Events the User is attending to is almost the same:

Remember, this will not get you the Events the user created. For that, you will have to dig deeper and use FQL (Facebook Query Language):

The Events will be sorted descending by their starting date, newer Events will show up first:

Links

  1. Facebook Query Language (FQL)
  2. Facebook Graph API
  3. Event Attending App

Leave a Reply

Your email address will not be published. Required fields are marked *