How can I get the events for a Facebook page?
As unknow_b said :
currently to access events you can also use a user endpoint such as ‘/me/events’ or ‘/me/events/not-replied’ using an access token valid for that user. you can get the events that the user was invited to or is going/interested
But the access token user, is only working for 1 hour ! Does someone have another better idea?
Yep. Facebook has taken down the Graph API for page access tokens. I had this code in production for 2 years and it worked great. The only way to retrieve data (or was a week or so ago), was a temporary user token that lasts about 2 hours. It's totally broken my band's schedule page. I've been through every avenue and even spoke with a facebook ad team employee on the phone that was aware of it. She seemed to empathize but had no solution for me. I would count on it being down for a while.
Currently Facebook is not returning events for pages using Pages API unless you use an user accesss token and that user has been invited to any of the events of the page or is attending/interested in any of the events of the page.
I'm trying to do the same thing: getting public events from a page. Related to the above suggestions:
- I tried the short-lived user access token two weeks ago, which worked for a short time. Now it does not anymore. Does it for any of you?
- Both the long-lived user token, a page token generated with either a short- or long-lived user token do also not return any events.
At https://developers.facebook.com/docs/apps/review/#platforms, Facebook states:
Beginning April 4, 2018, all apps, including those formerly approved, must undergo App Review in order to gain access to the Events API, Groups API, and Pages API. Apps accessing the Events API and Groups API will lose access and require review once App Review resumes.
So being reviewed might help. I will report further.
Update 1: an answer on this related bug reports states it more clearly:
App review required to use the following edges: GET /page/events and GET /me/events
Meanwhile they cancelled all pending review requests for the Graph API 3.0 changes, so I have to resubmit.
Update 2: My project got rejected & I'm not bothering to continue it now.