新的persitent菜单信使节点js

时间:2017-04-20 14:47:21

标签: javascript node.js bots facebook-messenger facebook-chatbot

我正在使用messenger开发机器人,我需要更改以前的persitent菜单。

我的旧菜单代码:

 requestData = {
                     "setting_type": "call_to_actions",
                     "thread_state": "existing_thread",
                     "call_to_actions": [
                      {
                        "type": "postback",
                        "title": ......,
                        "payload": .....,
                      },
                      {
                         "type": "web_url",
                         "title": .....,
                         "url": ......,
                       },]};

但是当我使用新表格时:

requestData = { "persistent_menu":[
    {
      "locale":"default",
      "composer_input_disabled":true,

      "call_to_actions":[
        {
          "title":.....,
          "type":"nested",
          "call_to_actions":[
            {
              "title":......,
              "type":"postback",
              "payload":......
            },
          ]
        },   
      ]
    },
    {
      "locale":"zh_CN",
      "composer_input_disabled":false
    }
  ]};

它不起作用,如果你能帮助我,我将非常感激。

0 个答案:

没有答案