Facebook API – Guest List of Facebook Events

There is no easy and integrated way to get the guest list of a Facebook Event anymore. You can view the list of “attendees”, but you just get a small box with no possibility to export it without additional tools. Especially with hundreds of people attending, the list that Facebook offers does not help you at all to get an overview:

You can grab the guest list with a Greasemonkey-Script, but the easier way (at least for a developer) is to use a Facebook App. I will not get into detail how to set up a Facebook App, there are plenty of tutorials out there covering that topic.

Graph API – Attending

You don´t need to authorize any User to get the attendees of a Facebook Event, as long as the Event is created through a Facebook Page. If you want to do the same for User Events, you are going to have to use the “user_events” permission.

As (almost) always, using the Graph API to get the attendees is pretty simple:

$attending = $facebook->api('/[EVENT-ID]/attending');
$attending = $attending['data'];

foreach ($attending as $attendee)
{
	echo 'ID: ' . $attendee['id'] . ' / ';
	echo 'Name: ' . $attendee['name'] . "\n";
}

Of course you only get basic data like the User ID (Facebook ID) and the Name of the User, but it should be enough for a nice guest list and you can easily create a CSV-/Excel-Export with that.

Here an example App if you want to try it with your own Events, and the Events of your Pages: http://facebook.devils-heaven.com/apps/eventattendees
The design is not very sophisticated, but i hope you can deal with it 🙂

Links

  1. Facebook PHP SDK
  2. Facebook Graph API
  3. Event Attending App

2 thoughts on “Facebook API – Guest List of Facebook Events”

  1. Hi Guys,

    Im aware that this is an old topic. The guest list still works well!
    Although I guess there is a limit of participants – up to 1000.

    I have an events around 14 000 attendants to export. Is there any way I can do that???

    Thanks

    1. hi! check if there is a pagination url in the result of the graph api call – if there is one, you just need to do another graph api call to get the next 1000….and so on, until there is no pagination link anymore.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.