Roman Lopez
Roman Lopez

Reputation: 168

Facebook graph page events excluding cancelled

With the current v2.8 Facebook graph when retrieving /{pageid}/events ... cancelled events are not included is there a way to include them? Is canceled is useless then

Upvotes: 1

Views: 183

Answers (1)

microDude
microDude

Reputation: 241

Look at Facebook Graph API for Pages/Events. It is not very obvious from the document guide, but you need to add the ".include_canceled(true)" into your query URL. For example, look at the end of the following URL.

https://graph.facebook.com/v2.8/<PageName>?access_token=<AccessToken>&fields=events.include_canceled(true)

You can then add special query parameters and limiting to your query. As a bonus example,

https://graph.facebook.com/v2.8/<PageName>?access_token=<AccessToken>&fields=events.include_canceled(true).limit(10){name,start_time,end_time,description,place,is_canceled,cover,updated_time,attending_count,maybe_count,interested_count}&format=json&method=get&pretty=1

Upvotes: 2

Related Questions