My bot has been approved and is available publicly (see image), 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****' }