BeM*_*com 2 curl facebook chatbot facebook-chatbot
我正在尝试为我的Facebook Chatbot实现持久菜单.遗憾的是,有两个(完全不同的)实施文档,这些文档对我来说都不起作用.(两者都适用于API v2.6)
https://developers.facebook.com/docs/messenger-platform/messenger-profile/persistent-menu https://developers.facebook.com/docs/messenger-platform/thread-settings/persistent-menu
我使用了这个返回错误的简单调用(#100)参数setting_type是必需的
curl -X POST -H "Content-Type: application/json" -d '{
"persistent_menu":[
{
"call_to_actions":[
{
"type":"web_url",
"title":"Einstellungen",
"url":"https://{{url-part}}.cloudfront.net/",
"webview_height_ratio":"full"
}
]
},
{
"locale":"de_DE",
"composer_input_disabled":false
}
]
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token={{token}}"
Run Code Online (Sandbox Code Playgroud)
如果我使用第二个文档"setting_type" : "call_to_actions"发生相同的错误.也许有人可以向我解释为什么我不能设置持久菜单?能得到一些帮助会很高兴.
祝一切顺利
丹尼尔
以下对我有用.
确保将请求发送到新端点,messenger_profile.您必须至少提供默认语言环境.
curl -X POST -H "Content-Type: application/json" -d '{
"persistent_menu":[
{
"locale":"default",
"composer_input_disabled":false,
"call_to_actions":[
{
"type":"web_url",
"title":"Einstellungen",
"url":"https://{{url-part}}.cloudfront.net",
"webview_height_ratio":"full"
}
]
}
]
}' "https://graph.facebook.com/v2.6/me/messenger_profile?access_token={{token}}"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
865 次 |
| 最近记录: |