I'm currently trying to implement a Persistent Menu for my Facebook Chatbot. Sadly there are two (completely different) documentation for the implementation which both don't work for me. (Both should work for 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
I used this simple call which is returning an error (#100) The parameter setting_type is required
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}}"
If I use the second documentation with "setting_type" : "call_to_actions"
the same error occurs.
Why I can't set up a Persistent Menu?
The below works for me.
Make sure you are sending the request to the new endpoint, messenger_profile
. You have to provide at least a default locale.
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}}"