Facebook Chat Bot - How to check your welcome message?

My bot chat works fine, but it's hard for me to debug the functionality of the greeting message, because it appears only at the beginning of the conversation (although I am sure that it does not work by trying it on my colleagues phone). How do I reset my chat, so it sees me as a new user interacting with it?

This is my hello PHP Script at the moment.

<?php function webhook() { $challenge = $_REQUEST['hub_challenge']; $verify_token = $_REQUEST['hub_verify_token']; if ($verify_token === 'MYTOKEN') { echo $challenge; } $input = json_decode(file_get_contents('php://input'), true); $sender = $input['entry'][0]['messaging'][0]['sender']['id']; $welcomejson = welcomemessage(); welcomesend($json); function message() { $json = '{ "setting_type":"call_to_actions", "thread_state":"new_thread", "call_to_actions":[ { "message":{ "text":"Welcome to My BOT!" } } ] }'; return $json; } function send($json) { $url = 'https://graph.facebook.com/v2.6/MYPAGEID/thread_settings?access_token=MYTOKEN'; //Initiate cURL. $ch = curl_init($url); //Tell cURL that we want to send a POST request. curl_setopt($ch, CURLOPT_POST, 1); //Attach our encoded JSON string to the POST fields. curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData); //Set the content type to application/json curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); //Execute the request $result = curl_exec($ch); } 

exampleofissue

+6
source share
3 answers

Try the following:

  • Open Facebook in your desktop browser and go to the page associated with your bot messenger
  • Click Message
  • Inside the popup / discussion window, select β€œOptions” (cog icon)
  • Select "Delete conversation ..." and say "Delete conversation" at the confirmation prompt.
  • Select Message again
  • Choose "Start"

Step 4. Really deletes the chat history that you use with the page / application, so be careful.

+17
source
  • On the desktop, delete the conversation and send the message to the page again.

This will allow you to see the Start button again, allowing you to test it and your welcome message features.

If you are trying to test Greeting Messenger, it is much more complicated. See below.


On the desktop, "Messenger Greeting" will still not appear after deleting a conversation. Only the start button opens. I believe that this is a mistake, that I will most likely open a ticket.

You can get a similar experience on mobile devices by deleting a conversation, uninstalling and reinstalling Messenger, but once again that does not display the Messenger greeting, it only shows the start button.

The inability to see the Messenger greeting is again a problem for developers who are picky about building the Messenger greeting line by line, or just need to see it again to demonstrate the bot messenger after the greeting has already been noticed.

Fortunately, although it is extremely painful, there is a workaround. In principle, you need to reinstall the bot.

  • Create New Page
  • NEVER OPEN A MESSAGE WITH A PAGE / BOT NEVER STEP 17
  • Click "Settings", "Messenger" and set a greeting for messages and click "Save."
  • Since for some reason this does not actually save the changed setting, select the other side from the messenger in the sidebar
  • Re-select Messenger
  • Enable greeting (message must be saved correctly, just don’t switch on or off)
  • Change to the other side in the sidebar
  • Re-select Messenger and double-check whether the greeting is enabled in the messenger.
  • Create a new application
  • Add Messenger as a Product
  • Select a page and copy the page access token
  • Place the access token on the page where necessary in the code
  • Run your code
  • Connect to the webhook URL with a validation token and all checked cells.
  • After successfully connecting to the website, subscribe to the new page
  • Run the curl command to enable the "get started" button and your welcome message that will happen after the button is clicked.
  • Open the message with your page and a Messenger greeting and a get started button will appear. YOU WILL GET ONE CHANCE, AND THEN YOU SHOULD REPEAT ALL THESE STEPS TO VISIT THE LAST.

I believe that the inclusion of a non-retaining right in the Messenger greeting is also a mistake, and I can open a ticket for it.

+4
source

There is a way to get a welcome screen in Messenger on iOS (at least as of April 28), although this is very annoying. Basically, in addition to uninstalling convo, you must reinstall the application on your phone.

  • Go to the page associated with your facebook bot on your desktop.
  • Conversation Archive
  • Open Messenger on your phone and delete the conversion by checking directly in the cell in the list of conversations
  • Remove Messenger from your phone.
  • Reinstall Messenger from the App Store.
+2
source

All Articles