问题
I had a submitted and approved Facebook messenger bot working. But I just got a developer update just now saying "Your Webhooks subscription for callback URL https://BOTNAME.herokuapp.com/ has not been accepting updates for at least 16 minutes. Please verify that your callback server is functioning."
I do see that my callback server and application is working on Heroku.
This problem usually gets solved if I generate a new page access token and restart the web application with this new page access token in it. But this time I'm unable to generate an access token either.
I tried generating a new page access token from my Developer account page for the specific page on which the app is running, but the error now says "Invalid Scopes: pages_messaging_subscriptions. This message is only shown to developers. Users of your app will ignore these permissions if present." There is no Documentation on this. Any suggestions?
回答1:
I got this message today also. This is the bug from Facebook.
Right now, you can get Page Access Token via Graph API Explorer instead of App Dashboard.
- Go to: https://developers.facebook.com/tools/explorer/
- Click Get Token > Get User Access Token
- Select the following scopes :
manage_pages
,pages_messaging
, andpages_messaging_phone_number
. - In Application selector, select your app.
- Select your page to get Page Access Token.
Now you have Page Access Token, which you can use it for your Messenger Bot.
Check whether it worked by doing :
curl -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token={{your_access_token}}"
回答2:
I was also having the same difficulties. Its now resolved and they have now changed the way page access token is issued.
来源:https://stackoverflow.com/questions/38909357/webhooks-failing-with-invalid-scopes-pages-messaging-subscriptions