0

I need some help regarding chatbot development. right now i am doing a project wherein im creating a chatbot using dialogflow and im testing it in FB messenger. one of the modules that i need to accomplish is to put a "get started" button to start a chat and a persistent menu in FB messenger. i've tried to search on how to do it but there's no specific tutorial on how to implement it in dialogflow. i never tried any code so far 'coz i don't know where should i put it. i hope someone out there will help me regarding this matter. thank you so much!

aeri
  • 1
  • 3

1 Answers1

0

You can do these using Postman (free) but first you should have an Access Token

To get your page Access Token:

  1. Head over to your Facebook App that you created for the bot on Facebook Developers
  2. Go to Messenger --> Settings enter image description here
  3. Access Token Section
  4. Generate an Access Token for your page

GET STARTED BUTTON

After you get your Access Token Go to Postman

  1. Send a POST Request to: https://graph.facebook.com/v2.6/me/thread_settings?access_token=xxxxx
  2. Replace xxxxx with your Access Token previously fetched
  3. Go to Body and insert the following JSON

{ "setting_type":"call_to_actions", "thread_state":"new_thread", "call_to_actions":[ { "payload":"YOU PUT OPTIONAL PAYLOAD HERE" } ] }

enter image description here

PERSISTENT MENU

  1. Send a POST Request to: https://graph.facebook.com/v2.6/me/messenger_profile?access_token=xxxxx
  2. Replace xxxxx with your Access Token previously fetched
  3. Go to Body and insert the following JSON (you can edit as you wish)

    { "persistent_menu":[ { "locale":"default", "composer_input_disabled":false, "call_to_actions":[ { "title":"Title 1", "type":"postback", "payload":"payload1" }, { "title":"Title 2", "type":"postback", "payload":"payload 2" }, { "title":"Title 3", "type":"postback", "payload":"payload 3" } ] } ] }

enter image description here

Marc Asmar
  • 1,527
  • 1
  • 10
  • 22
  • Unfortunately I have an error in Postman when trying to set up the `Get Started ` button. I get : `"message": "(#100) Requires one of the params: get_started, ...` – Revolucion for Monica Apr 04 '20 at 21:11