如何禁用 Facebook Messenger 永久菜单?

How do i disable Facebook messenger persistent menu?

我最近为我的机器人启用了 persistent_menu,但现在我想禁用它。

下面是我如何启用它

data={
  "psid" : uid,
  "persistent_menu" : [{
    "locale" : "default",
    "composer_input_disabled" : False,
    "call_to_actions" : [
        {
        "type": "postback",
        "title": "Request Ride",
        "payload": "Request Ride"
      },
      {
        "type": "postback",
        "title": "Call Customer Service",
        "payload": "Call"
      },
    ]
  }]
}

r = requests.post("https://graph.facebook.com/v6.0/me/custom_user_settings?access_token=<PAGE TOKEN>", data=json.dumps(data), headers={"Content-Type" : "application/json"})

要禁用它,只需省略 call_to_actions 字段:

{
    "psid": <PSID>,
    "persistent_menu": [
        {
            "locale": "default",
            "composer_input_disabled": false
        }
    ]
}