Messenger持久性菜单不可见

时间:2017-05-03 10:20:38

标签: php facebook facebook-graph-api bots

我目前正在开发一款Facebook messenger机器人。但是,我无法附加持久性菜单。

我阅读了要求here

maxlength

所有这些都得到满足。

当我设置菜单时,我会收到来自Facebook的反馈:

The user must be on Messenger v106 or above on iOS or Android.
The page the bot is attached to must be published.
The bot must be set to "public" in the developer console.
The bot must have passed the approval process for pages_messaging permission

但是,它仍未在我的Android设备上显示,也未在网络Facebook上显示。我删除了对话并多次重新输入,但没有成功。

顺便说一句,我使用this lib进行Graph api,以防万一。

2 个答案:

答案 0 :(得分:2)

好的,关键在于您必须为每个区域设置发送一系列菜单,但奇怪的是Facebook不会在您的请求错误时发出警告

答案 1 :(得分:0)

Xameeramir,我的意思是这样的。请注意每个区域设置的菜单如何不同。

curl -X POST -H "Content-Type: application/json" -d '{
"persistent_menu":[
    {
      "locale":"default",
      "composer_input_disabled":true,
      "call_to_actions":[
        {
          "title":"My Account",
          "type":"nested",
          "call_to_actions":[
            {
              "title":"Pay Bill",
              "type":"postback",
              "payload":"PAYBILL_PAYLOAD"
            },
            {
              "title":"History",
              "type":"postback",
              "payload":"HISTORY_PAYLOAD"
            },
            {
              "title":"Contact Info",
              "type":"postback",
              "payload":"CONTACT_INFO_PAYLOAD"
            }
          ]
        },
        {
          "type":"web_url",
          "title":"Latest News",
          "url":"http://petershats.parseapp.com/hat-news",
          "webview_height_ratio":"full"
        }
      ]
    },
    {
      "locale":"zh_CN",
      "composer_input_disabled":false
    }
  ]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token=YOUR_ACCESS_TOKEN_HERE"