Facebook post permissions

Just trying to understand how permissions work. I am posting from a page (I am an administrator) via an API for myself:

POST https://graph.facebook.com/v2.8/_page_id_/
{
  "recipient": {
    "id": "_my_id_"
  },
  "message": {
    "text": "hello, world!"
  }
}

      

we get:

{
  "error": {
    "message": "(#230) Requires pages_messaging permission to manage the object",
    "type": "OAuthException",
    "code": 230,
    "fbtrace_id": "CofCWlt4GXP"
  }
}

      

Why is facebook rejecting me?

UPD1.

I don't understand the reason because of:

When your application is in development mode, the submit API will only work for administrators, developers, and testers of the application. Once approved by your application and the public, it will work for the general public.

Do I still need special permissions in development mode?

UPD2.

enter image description here

I got permission, but still not allowed to send messages via the API:

{
  "error": {
   "message": "(#230) Requires pages_messaging permission to manage the object",
    "type": "OAuthException",
    "code": 230,
    "fbtrace_id": "GJRxafu1uNx"
  }
}

      

+3


source to share


1 answer


you need permissions for this. pages_messaging

for this.

Check out this page to see how it works. Session_page resolution

This allows messages to be sent and received via the Facebook page, but only for 24 hours after the user's action. For messages within 24 hours, see the following resolution. Conversations through this API can only start when someone points out through the Messenger plugin or sends you messages directly that they want to receive messages from you. Try to get a token with this permission from the graphical explorer.

It should work after that.



https://developers.facebook.com/tools/explorer/

UPDATE:

Yes, some of these actions require specific permissions. They refer to the availability of the application for use. When the application is in dev mode, the administrator must obtain a token with the necessary permissions to perform certain actions.

+2


source







All Articles