5

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.

timmyg13
  • 503
  • 1
  • 5
  • 15
  • Do you need to send messages through your app or just read them? – Code Jun 22 '16 at 13:55
  • @Code Will need to send and read them – timmyg13 Jun 22 '16 at 13:57
  • 1
    Have you built a bot and setup a webhook already? You only need to submit your app for review right before going live with it, that is not needed for development. If you do have a bot and are ready to go live, but still getting denied the permissions, then it sounds like your bot is failing when FB tests it. – Jon Church Jul 18 '17 at 02:55
  • Try create a test user. if Facebook can test it by using your test user, they will approve it. – Jason Ching Sep 16 '17 at 05:00

2 Answers2

4

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

Code
  • 6,041
  • 4
  • 35
  • 75
  • so if Im just using webhooks for page messages and graph api to send page messages, I dont need the pages_messaging permission, correct? – timmyg13 Jun 22 '16 at 14:19
  • removed permission and now getting "message":"(#230) permission pages_messaging is required to register webhook for messages or deliveries" – timmyg13 Jun 27 '16 at 22:00
  • @timmyg13 do you have `read_page_mailboxes` and `manage_pages`? – Code Jun 28 '16 at 03:39
  • yep, am requesting both of those and have both approved by facebook (if that matters) – timmyg13 Jun 28 '16 at 10:59
  • @timmyg13 Check to ensure you're using the correct endpoint. If you are then I don't have a clue... – Code Jun 28 '16 at 11:11
2

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.

derabbink
  • 2,419
  • 1
  • 22
  • 47
  • I have read_pages_mailbox permission, how can I get content of message from conversation webhook? – timmyg13 Jun 29 '16 at 03:18
  • 1
    You cannot get the messages from the webhooks directly. You need to make follow-up requests on Graph API based on the conversation IDs that are sent to your server via webhooks. – derabbink Jun 30 '16 at 09:03