3

I can't get the official_events API to work in the Facebook API.

I made a Facebook app:

  • App type: Business
  • Not "Native or desktop app"
  • Latest API versions

I request an access token with the following permissions. (Probably more then needed but just trying)

  • public_profile email
  • pages_manage_posts
  • pages_manage_engagement
  • pages_manage_metadata
  • pages_manage_posts
  • pages_read_engagement
  • pages_read_user_content
  • pages_show_list

I login with myself or with the Facebook OpenGraph API test user. I created a test page with both users.

I request the pages with access tokens with a call to the "me/accounts" endpoint.

With the page token I can create a message on the test page in the Graph API Explorer:

POST to <page_id>/feed

{
  "message": "Hello world"
}

That works! So the page token is working.

Then I want to create an event on the page with the API described here: https://developers.facebook.com/docs/pages/official-events/

Post to /official-events

{
  "name": "test event",
  "description": "some description",
  "cover": {
    "source": "https://testimages.org/img/testimages_screenshot.jpg",
    "offset_x": "0",
    "offset_y": "0"
  },
  "category": "FAMILY_EVENT",
  "timezone": "US/Pacific",
  "start_time": "2022-12-24 17:45:12"
}

But i receive this error:

{
  "error": {
    "message": "(#3) Application does not have the capability to make this API call.",
    "type": "OAuthException",
    "code": 3,
    "fbtrace_id": "AzueJBRnUjeqZh7vO0RxnG5"
  }
}

Does anyone have any idea?

Maarten
  • 81
  • 3
  • According to the reference the app access token is used to create an event: https://developers.facebook.com/docs/pages/official-events/getting-started#app-access-token – Norbert Aug 02 '22 at 09:26
  • It does, but I get the same error when I use the app token. I also don't understand how that would work, how can you give access to update a page to an app? The same page also states: "If you enable a third-party to create, publish, or manage events for a page, you must obtain a page access token for the page and request the pages_manage_engagement, pages_manage_posts, pages_read_engagement, and pages_read_user_content permissions from the third-party." – Maarten Aug 24 '22 at 12:58
  • So that's what I'm trying to do. To clarify what the endgoal is. I'm working on a web system where clients can create and show events that happen in there venues. It's very cumbersome for them to add the events to our platform and also to Facebook by hand, so I want to add the events to their Facebook page automatically from our platform. (After they logged in on Facebook and give our app permission to update their page) – Maarten Aug 24 '22 at 12:59
  • @Maarten did you find the problem and how to fix it ? On my side, I tried to add a system user access token from meta business manager with an access granted to the system user, to manage the said FB page – Cyril Duchon-Doris Feb 24 '23 at 23:09
  • Nope I still haven't fixed it. Did your attempt succeed? – Maarten Feb 27 '23 at 19:18

0 Answers0