Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Messenger API pages_messaging permission

I am creating an application where I need a user to be able to grant us access to their facebook page so that all incoming messages can flow through our application (as well as outgoing).

I have this all working correctly, but facebook will not approve my app due to the facebook permission pages_messaging and them "not receiving a response from my bot" (I have been denied three straight times). What am I doing wrong here? We are not using bots, do I even need the pages_messaging permission (I am using their webhook to get incoming page messages, and graph api to send outgoing)?

When submitting app, pages_messaging permission says:

Please provide the page that can be used to test this bot. Make sure the bot is properly connected and functional, otherwise your submission may be rejected.

Here is facebook's feedback from my submission (denied multiple times):

Thank you for your submission. We tested the messenger experience on your associated page and received no response from your messenger bot. Please resubmit with the new, improved version of your bot.

like image 665
timmyg13 Avatar asked Jun 22 '16 13:06

timmyg13


2 Answers

You got to create a bot to use the messaging API: https://developers.facebook.com/docs/messenger-platform/implementation


To just read/send messages:

https://developers.facebook.com/docs/graph-api/reference/v2.6/conversation/messages

like image 50
Code Avatar answered Sep 20 '22 04:09

Code


You can use the /pageID/conversations endpoint to retrieve all conversations your page has had with FB profiles.

Next you can read/post to the /conversationID/messages endpoint to read/respond to a person.

And you can even subscribe to the conversations field for pages with webhooks.

You will need a page admin's page access token that has the read_page_mailboxes permission scope to set up the subscription, and to read/reply to messages.

like image 24
derabbink Avatar answered Sep 21 '22 04:09

derabbink