I am trying to setup a webhook for the Facebook Messenger Bot Platform and i am receiving this error:
The URL couldn't be validated. Response does not match challenge, expected value = '892694233', received='892694233<link rel...'
I am using a heroku host for testing and a callback URL with SSL, the project is on Laravel 5.2 and this is the code that processs the webhook setup
if ($request->get('hub_verify_token') == config('services.bot.verification_token')) {
return (new Response())->setContent($request->get('hub_challenge'));
}
return (new Response())->setContent('Error: token mismatch');