php - Facebook Messenger API webhook trouble -
i trying setup webhook facebook messenger bot platform , receiving error:
the url couldn't validated. response not match challenge, expected value = '892694233', received='892694233<link rel...'
i using heroku host testing , callback url ssl, project on laravel 5.2 , code processs 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');
i'm not familiarized lavarel, looks way extracting value of parameter hub.challenge giving wrong value: '892694233
if return number in response ('892694233') should work. maybe can clean result of calling $request->get('hub_challenge') in order remove text @ end?
Comments
Post a Comment