25

This looks a kind of duplicate question but actually NOT.

So the problem is https://www.facebook.com/julytalk/ has events, for sure. But when I tried on Facebook Group API toolkit, it returns empty array.

https://developers.facebook.com/tools/explorer/145634995501895?method=GET&path=204859706228731%2Fevents&version=v2.12

Why is this happening? I could not find any Facebook API endpoint modification notice, at all. It was working okay before.

Please help me.

andyrandy
  • 72,880
  • 8
  • 113
  • 130
Codemole
  • 3,069
  • 5
  • 25
  • 41

2 Answers2

21

https://developers.facebook.com/blog/post/2018/04/04/facebook-api-platform-product-changes

Access to the Events API is not possible at the moment:

...apps currently accessing Events and Groups APIs will lose access today

Update: After Facebook did a lot of changes, it seems to be possible to get events again. You can get events from Pages you manage easily in dev mode. If you want to get public events, you may want to read the answer in this thread: Facebook pages API: "Page Public Content Access" review screencast

andyrandy
  • 72,880
  • 8
  • 113
  • 130
  • 12
    Oh.. no, what the hell, how come Facebook made such a decision :-( – Codemole Apr 12 '18 at 12:58
  • 2
    has there been any word if Facebook will allow to get the events data anytime soon? – Carlos Apr 19 '18 at 04:30
  • 1
    When exact it will be re-enable or how to reactive ? – Tejas Tank Apr 19 '18 at 05:27
  • 1
    only facebook knows – andyrandy Apr 19 '18 at 05:31
  • I guess this is part of them changing what is available via the API, not shocking given the news. Hopefully they revisit this and reopen the public events edge. It was really helpful to have that available. – Geoff Maddock Apr 19 '18 at 06:24
  • They will reopen it, but as the linked doc says "going forward, access to these APIs will require a formal app review". Many people uses the event api to post event data to the web. Do you think these kind of "apps" which do not run on facebook, only use the api to fetch data will pass the review? – Tom Apr 19 '18 at 13:54
  • 2
    They will probably delay as much as possible... https://techcrunch.com/2017/11/10/facebook-local/ – Jean Apr 23 '18 at 09:55
  • 1
    Freaking Cambridge Analytica – Beni Sinca May 01 '18 at 10:13
  • 2
    But the next sentence says: "Going forward, access to these APIs will require a formal app review and for apps using the Pages API, submission is required within 90 days once app review resumes or access will be removed." what if you have an app which is in dev mode? What is the point of an app review when testing an app? – A.W. May 11 '18 at 06:56
  • https://developers.facebook.com/docs/apps/review Looks like this document was updated with some more info on the review process. One thing that is confusing to me is their section about Apps That Require Review referring to confirming and verifying your Business information. What if you are using the API and it's not a business at all, but, for example, a community portal, or a student group. Seems weird. – Geoff Maddock May 18 '18 at 00:20
  • 3
    Today on https://developers.facebook.com/docs/graph-api/reference/page/events/ it says "This edge is only available to a limited number of approved apps. Unapproved apps querying this edge will receive an empty data set in response. You cannot request access to this edge at this time." – Ivo Smits May 24 '18 at 14:01
  • I checked today and I can get events again from my own Page. My app is still in dev mode and received empty data the last 2 weeks. Don't know if this is temporary. I have not yet entered an app review process. – A.W. May 28 '18 at 05:45
  • 2
    I just checked the Graph API Explorer and fetching a public page's events does not work. Returns an empty array. Boo – heffaklump May 28 '18 at 07:25
  • @luschn Don't need to, /events is a public page edge, ownership or management of the page is not required. – Wobbles Jul 19 '18 at 12:21
  • just because it is public on facebook does not mean you are allowed to grab it. for example, you can only get ratings with the api if you manage the page. i assume it would be the same for events now, because if you don´t own the page you don´t really need to get the events. – andyrandy Jul 19 '18 at 13:19
  • @luschn shortsighted and completely untrue. There are many reasons for websites to want to aggregate events from FB pages they do not own. Above all remember, this was working perfectly fine until recently. – Wobbles Jul 19 '18 at 13:50
  • Can you update this answer to include that it's possible to test page events in dev mode as well as clarify Public Page access https://stackoverflow.com/questions/50455988/facebook-pages-api-page-public-content-access-review-screencast/ – phwd Jul 19 '18 at 13:58
  • I would not want anyone to be able to grab the events from my page without my permission and knowledge. Just my 2 cents though, but i would not call that "shortsighted". @phwd: i will add a link to your answer, it´s pretty great! – andyrandy Jul 19 '18 at 16:11
3

The above answer was misleading for me, not because its wrong but because so many things have changed on Facebook's side and I needed further clarification.

This is the current state based on my research (25.08.2020.).

There are several types of events available based on where the event destination is:

  1. User events

    Documentation terminology: "Events on User"

    API endpoint:

  • me/events
  1. Page Events

    Documentation terminology: "Events on Groups"

    API endpoints:

  • me/groups
  • group_id/events
  1. Group Events

    Documentation terminology: "Events on Pages"

    API endpoint:

  • me/accounts
  • page_id/events
  1. App Events

    Documentation terminology: "Events on an App"

    API endpoint:

  • {application-id}/events

About app events.

The list is taken mostly from Facebooks API event endpoint.

The documentation is wrong on event limitations:

Access to Events on Users and Pages is only available to Facebook Marketing Partners.

The current state is that "Access to Events on Users and Pages is available to": A) App Admins (verified with testing) B) App Developers (verified with testing) C) App Testers (not verified) D) Facebook Marketing Partners (not verified)

What does this mean?

This means if your query the "me/accounts" endpoint which will give you a list of page ids. When you select a page id and then query "your_selected_page_id/events" you will receive:

  • An empty list if you are not A-D)
  • A list of events which is not the same as your users.
  • A lot of confusion and frustration because there is no error message thrown.

I have tested this with different API versions 4.0 - 8.0 and the results were the same. I have also tested this with a different but similar set of permissions, resulting in the same empty array response.

SOLUTION(S):

TODO: UPDATE: Clarify who needs to become FMP.

  1. To query for page events "someone" needs to be a Facebook Marketing Partner. https://developers.facebook.com/support/bugs/352704275741601/

  2. Invite your users to become testers.

Helpful links:

Read more on Facebook Marketing Partners.

Officially on Facebook Marketing Partners.

Facebook Graph Explorer.

Facebook Batch Requests.

Additional notes:

  • Page event fetching has the same requirements as user events fetching.
  • Group event fetching works for all users (ignores A-D).
  • Creating batch requests with no FMP will result in response sections that only have empty arrays.
Darkwonder
  • 1,149
  • 1
  • 13
  • 26
  • 1
    Thank you for this. Dealing with Facebook API and permission has been a very frustrating and disappointing process. We got the pages_read_engagement permission and everything seemed fine on development mode, but when we switched to live, we got the blank array. Documentation is not clear that you need to be a FMP to be able to read that endpoint. We hit a dead end because we cannot afford to become a FMP. Any ideas? Here's the EXACT issue we had: https://developers.facebook.com/support/bugs/342762730365123/ – Naner Oct 26 '20 at 19:56
  • Also, to comment on your solutions, invite users to be testers would only work on development mode I believe, haven't tried it though. – Naner Oct 26 '20 at 19:58