I have recently worked with the new chat bot API and there’s a lot that can go wrong. So, here are some Ideas.
- Make sure you’ve verified your webhook under the product settings tab.
- subscribe your app to the page using your page access token. It returns
{"success" : "true"}
if everything goes right.
Important
-
Make sure the Facebook user from which you’re sending the message is listed as the Admin or Developer or Tester in your app roles (https://developers.facebook.com/apps/YOUR_APP_ID/roles/). Messages from other users won’t work unless your app is approved and publicly released.
-
Have you received any call back from the facebook api ? or is it just the messages? Take a look at the logs of your web server and check if you’re getting any hits on the webhook. Also check the error logs.
-
Try hitting your webhook manually and see if it responds. You can use
curl to generate a manual request. This is what the request from
Facebook looks like:
Command:
curl -i -X POST -H 'Content-Type: application/json' -d '{"object":"page","entry":[{"id":43674671559,"time":1460620433256,"messaging":[{"sender":{"id":123456789},"recipient":{"id":987654321},"timestamp":1460620433123,"message":{"mid":"mid.1460620432888:f8e3412003d2d1cd93","seq":12604,"text":"Testing Chat Bot .."}}]}]}' https://www.YOUR_WEBHOOK_URL_HERE