Webhooks因“无效范围:pages_messaging_subscriptions”而失败 [英] Webhooks failing with "Invalid Scopes: pages_messaging_subscriptions"

查看:696
本文介绍了Webhooks因“无效范围:pages_messaging_subscriptions”而失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个提交并批准的Facebook Messenger Messenger机器人工作。但是我刚刚收到开发人员更新说
您的Webhooks订阅回调URL https://BOTNAME.herokuapp / b>

我确实看到我的回叫服务器和应用程序正在Heroku上工作。



如果我生成新的页面访问令牌并使用此新页面访问令牌重新启动Web应用程序,通常会解决此问题。但是这次我无法生成访问令牌。



我尝试从我的开发者帐户页面为运行该应用程序的特定页面生成新的页面访问令牌,但错误现在显示
无效范围:pages_messaging_subscriptions。此消息仅供开发人员使用,如果您的应用程序存在,您的应用程序的用户将忽略这些权限。
没有关于此的文档。任何建议?

解决方案

今天我也收到了这条消息。也许这是来自Facebook的新bug。我会报告这一点。



现在,您可以通过Graph API Explorer而不是App Dashboard获取Page Access Token。


  1. 转至: https://developers.facebook。 com / tools / explorer /
  2. 点击获取令牌>获取用户访问令牌

  3. 选择以下范围: manage_pages pages_messaging pages_messaging_phone_number

  4. 在应用选择器中,选择您的应用。


  5. 检查它是否有效:


    现在您有页访问令牌,您可以将它用于您的Messenger Bot。

    curl -X POST https://图表。 facebook.com/v2.6/me/subscribed_apps?access_token= {{your_access_token}}


    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?

    解决方案

    I got this message today also. Perhaps this is new bug from Facebook. I'm going to report this.

    Right now, you can get Page Access Token via Graph API Explorer instead of App Dashboard.

    1. Go to: https://developers.facebook.com/tools/explorer/
    2. Click Get Token > Get User Access Token
    3. Select the following scopes : manage_pages, pages_messaging, and pages_messaging_phone_number.
    4. In Application selector, select your app.
    5. 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}}"

    这篇关于Webhooks因“无效范围:pages_messaging_subscriptions”而失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆