1

I want to integrate Facebook leads into my WordPress website.

I went through all instructions given on Facebook url https://developers.facebook.com/docs/marketing-api/guides/lead-ads/quickstart/webhooks-integration

But I'm not getting request parameters when webhook trying to verify webhook on page subscription.

$challenge = $_REQUEST['hub_challenge'];
$verify_token = $_REQUEST['hub_verify_token']

Also request body is blank.

file_get_contents('php://input');

Thanks to help in advance.

  • Suggest you go check your server access log to verify what requests exactly Facebook is sending to your endpoint. – CBroe Feb 06 '18 at 13:21
  • _“But I'm not getting request parameters”_ - and how exactly have you verified/noticed that? – CBroe Feb 06 '18 at 13:22
  • When I'm verifying from graph explorer tool by passing below data- object, callback_url, verify_token. I'm creating log file on each request – Akhtar Khan Feb 06 '18 at 13:24
  • Huh, what does Graph API Explorer have to do with that? GAE is for _you_ to make requests _to_ the Facebook API. – CBroe Feb 06 '18 at 13:25
  • exported data of graph api explorer - curl -i -X POST \ -d "object=page" \ -d "callback_url=https%3A%2F%2Ffisherzucker.com%2Ffb%2Fwebhook.php" \ -d "verify_token=abc123" \ -d "access_token=147121932016159%7CGFeANjmFm5koz81ifuJmGEO7Idk" \ "https://graph.facebook.com/v2.12/147121932016159/subscriptions" – Akhtar Khan Feb 06 '18 at 13:29
  • That is only the initial subscription part, that is the request you send to Facebook. I asked you about the request that Facebook then makes from their servers to your endpoint ... – CBroe Feb 06 '18 at 13:33
  • Facebook verify webhook on this initial subscription. Facebook visit webhook url but expected parameters hub_challenge and hub_verify_token not received on webhook page – Akhtar Khan Feb 07 '18 at 06:30
  • Again: Check your server access log to see what request Facebook actually sends. – CBroe Feb 07 '18 at 08:09

0 Answers0