Reputation: 332
I've created a bot using Microsoft's .NET Bot framework. I don't find a way to add persistent menu to my bot. How do I add that ?
Upvotes: 1
Views: 1008
Reputation: 10573
To create a persistent menu on Facebook you need to make an API call with the menu items and postback payload:
curl -X POST -H "Content-Type: application/json" -d '{"setting_type" : "call_to_actions","thread_state" : "existing_thread","call_to_actions":[{"type":"postback","title":"TITLE1","payload":"action?action1"}, {"type":"postback","title":"TITLE2","payload":"action?action2"},{"type":"postback","title":"TITLE3","payload":"action?action3"}]}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token={YOUR ACCESS TOKEN}"
You can remove it similarly:
curl -X DELETE -H "Content-Type: application/json" -d '{"setting_type":"call_to_actions","thread_state":"existing_thread"}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token={YOUR ACCESS TOKEN}"
Upvotes: 4