1

我正在 Messenger 中开发一个机器人,我需要更改我以前的永久菜单。

我的旧菜单代码:

 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
    }
  ]};

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

4

0 回答 0