airfang
airfang

Reputation: 1238

Facebook Graph API Event Paging not working?

I am trying to access past event via Facebook's Graph API.

I am getting current events just right (the one I attended last month and the one in the future) with

https://graph.facebook.com/me/events?access_token=[ACCESS_TOKEN]

However, the paging components "previous" and "next" don't really work, "previous" actually points to a future event that's already been listed in "me/events". While "next" just returns an empty "data" struct.

I also tried "since" with different previous timestamps (such as "me/events?since=1304238280") and it didn't work, it will always return the events that are the same as the ones returned by "me/events". But I definitely have many more past events when I visit

https://www.facebook.com/events/past/

Am I not using the graph API correctly or what? I also noticed there are quite a few questions regarding Graph API's paging problem but there doesn't seem to be a definitive answer yet.

Any info/suggestion/reference would be greatly appreciated!

Upvotes: 2

Views: 1190

Answers (2)

Ghassan Farah
Ghassan Farah

Reputation: 45

try to add the "before" query string with the ID of the first event ex:https://graph.facebook.com/me/events?&before=388551911259170. you can refer to the following link: https://developers.facebook.com/docs/reference/api/pagination/

Upvotes: 0

cpilko
cpilko

Reputation: 11852

From what I've seen, it appears that about two weeks after an event ends, Facebook moves the event data out of the events table and into another one that isn't exposed via the API. The internal Facebook servers have access to this table, so you can see past events from within the Facebook webapp.

I'm assuming this is a privacy thing.

Upvotes: 1

Related Questions