Facing this issue while verifying webhook in facebook chatbot also It's happening in dialogflow.
The URL couldn't be validated. Callback verification failed with the following errors: HTTP Status Code = 400; HTTP Message = Bad Request
Facing this issue while verifying webhook in facebook chatbot also It's happening in dialogflow.
The URL couldn't be validated. Callback verification failed with the following errors: HTTP Status Code = 400; HTTP Message = Bad Request
Adding a webhook is really easy, you can make a php script that first just logs whatever it receives and put it in your website. Just make sure is HTTPS and has the correct permissions to run and save it:
lets say that you create post.php and hosted in https://example.com/facebook/post.php
The basic code for post.php could be:
<?php
$input = (file_get_contents('php://input'));
error_log("\n",3,'log.log');
error_log(print_r($input, true),3,'log.log');
error_log("\n-------------------------------\n\n",3,'log.log');
?>
make sure that you create log.log file and give the web server permission to write on it.
Good Luck.
Please take a look at the Dialogflow documentation for the Facebook integration: https://dialogflow.com/docs/integrations/facebook . Dialogflow will provide a webhook URL that you must add to your project on developers.facebook.com (which is what I believe you're having trouble with).
If you're trying to setup a webhook for Dialogflow, first setup the Facebook integration, as described above and then take a look at Dialogflow's documentation on fulfillment: https://dialogflow.com/docs/fulfillment