3

My bot has been approved and is available publicly (see image)enter image description here, but it does not respond to anyone besides the developer.

I have it hosted on Heroku. I have tried to debug it with a ton of console logs, and I have realized that it doesn't log the "Enter App.Post" (see below) when any one other than the developer sends it a message.

Has anybody else experienced this behavior?

/// Facebook verification
app.get('/webhook/', function (req, res) {
    if (req.query['hub.verify_token'] === '***************') {
        res.send(req.query['hub.challenge'])
    }
    res.send('Error, wrong token')
})

/// Star up the server
app.listen(app.get('port'), function() {
    console.log('running on port', app.get('port'))
})

app.post('/webhook/', function (req, res) {
    console.log("Enter App.Post");
    messaging_events = req.body.entry[0].messaging
    for (i = 0; i < messaging_events.length; i++) {
        ....

Update: I found the following logs:

Error:  { message: '(#10) Cannot message users who are not admins, developers or testers of the app until pages_messaging permission is reviewed and the app is live.',
type: 'OAuthException',
code: 10,
fbtrace_id: 'CVUDg****' }
Shaun
  • 804
  • 2
  • 8
  • 16

1 Answers1

1

Are you sure your Facebook messenger bot has been approved by Facebook?

They have to formally approve specifically the messenger bot before anyone besides admins developers and testers can use it.

There's nothing in the code provided that would stop it from receiving messages from other users, so I'm guessing your bot hasn't actually been approved by Facebook yet.

If you're trying to test it with a user besides yourself, add them as a tester and they will have access to the bot, pre-approval.

user2322082
  • 658
  • 1
  • 6
  • 18
  • it has been [approved](https://www.dropbox.com/s/pm14owxg6xn8g4j/Screen%20Shot%202016-07-14%20at%208.50.29%20AM.png?dl=0) and is [public](https://www.dropbox.com/s/9v5o115v9ewruoh/Screen%20Shot%202016-07-14%20at%208.50.39%20AM.png?dl=0) . It also works fine for the people I specify as testers – Shaun Jul 14 '16 at 06:54
  • Maybe there was an issue with their approval. Is there a way to resubmit it? If there's not, you may have to open up a bug report. – user2322082 Jul 14 '16 at 12:25