How can I get a list of page events?

I am new to FB and am having difficulty getting a collection of page related events. Is there a way to get a list of all the events generated by the page?

I tried this unsuccessfully:

https://graph.facebook.com/search?type=event&place=PAGE_ID

This is an invalid request.

https://graph.facebook.com/PAGE_ID/events

It returns an empty set, I think, because it is looking for events that this page visits (and not those that it created).

Thanks.

+7
source share
2 answers

https://graph.facebook.com/PAGE_ID/events is the right way to get a list of events generated on a page. To return a list of events for a page, you need a valid access token.

Visit https://developers.facebook.com/tools/explorer to check this process.

I see an error with events created after April 23, when all events are not returned by a valid Graph API or FQL call. See This Post for more information: Graph API / FQL Does Not Return All Events for a Page

I have no errors creating privileges at https://developers.facebook.com/bugs/ . If you see the same problem and can post an error message, do it.

+10
source

This is the answer using the Javascript SDK

 FB.api( '/{page-id}/events', 'GET', {"fields":"timezone,cover,id,end_time,name,place,type,start_time,owner,event_times,description"}, function(response) { // Insert your code here } ); 

Here I list the events created by this page, and for each event I want the time zone, cover (image), identifier, start and end time, place, name, description and time of the event

0
source

All Articles