【问题标题】:Messenger persistent menu not visibleMessenger 永久菜单不可见
【发布时间】:2017-10-01 02:59:00
【问题描述】:

我目前正在开发一个 Facebook Messenger 机器人。但是,我无法为其附加永久菜单。

我阅读了要求here

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

所有这些都满足了。

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

Array
(
    [result] => success
)

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

顺便说一句,我正在使用this lib 用于 Graph api,以防万一。

【问题讨论】:

    标签: php facebook facebook-graph-api bots


    【解决方案1】:

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

    【讨论】:

    • 区域设置是什么意思。你是如何格式化语言环境的?
    【解决方案2】:

    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"
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-10-26
      • 2021-12-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多