Take the 2-minute tour ×

I would like to know if there is a Facebook API call to retrieve the events (eids) for all the events a user has created using my facebook connect application.

The events are created using the following REST api call:

https://api.facebook.com/method/events.create?event_info=' . $e_i . '&access_token=' . $cookie['access_token']

$e_i is the event info array where the 'host' value is set to 'Me' as follows

$event_info['host'] = 'Me';

On Facebook events under the "Created by:" section it lists "My user name,Application Name", I presume this is because I am the creator and the application is the admin as stated in the REST api documentation http://developers.facebook.com/docs/reference/rest/events.create/

Unfortunately I cannot seem to find out how (neither REST nor GPRAPH API) to return a list of events where I am the creator and the application is the admin as in the above scenario. If this is possible I would really appreciate some assistance with how it is done.

So far I have tried:

  1. REST API events.get using uid=application_id. This only returns events created by the application not those including the user who created them
  2. GRAPH API https://graph.facebook.com/me/events?fields=owner&access_token=... this returns all the events for 'me' but not where the application is also the admin.

It seems strange that there's no reference to the linkage between the event creator and the event admin through the API but in Facebook it is able to pull both and display them on the event details.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

If you're using the Graph API try calling $facebook->api('/App ID/events') which should return all events managed by the application (http://developers.facebook.com/docs/reference/api/application/).

Later on you can check the creator's ID and compare it with the User ID.

share|improve this answer
Hi Bartek, thanks for your response. I tried: graph.facebook.com/APP ID/events?access_token=... This returns the events created by the App alone (i.e where there was no access token supplied when creating the event). Unfortunately this does not include the events which were created by the user through the application. Perhaps I am creating the event in the wrong way...Any ideas? –  Anup Parekh Jan 5 '11 at 19:51
Right, it's quite weird that the event isn't amongst user's or app's events! I suggest you open graph.facebook.com/Event_ID in your browser where Event_ID is the ID of one of the events created by the user via your app. See what the value of the owner field is, maybe that will point you in the right direction. –  Bartek Jan 5 '11 at 22:14
Hi Barek, the event IS amongst the user's events. The "owner":"name" is the user who created the event. However there is no key in this JSON that refers to the app so I can not determine if it was created by this app or not. However, when viewing the event details in FaceBook it displays both the user name AND the App name in the Created By section. –  Anup Parekh Jan 5 '11 at 22:30
Yeah, I know what you're getting at because I checked that for several events. What I found out is that there always is only one owner, regardless of what the event page on Facebook says. This might suggest that at the moment there is not API call which could satisfy your criteria :( The only thing I can think of is: what is returned when you create an event? If it's the Event ID then you may consider storing it together with the user ID on your end instead of relying on the FB's API. –  Bartek Jan 5 '11 at 23:56
Hi Bartek, thanks so much for checking this out, good to know i'm not going mad :) I think I will have to manage some work around in my db for this, shouldn't be too much of a problem. Thanks again. –  Anup Parekh Jan 6 '11 at 15:21

Your Answer


