You can easily push your leads data to your end points. There are only few steps you have to follow to receive data on your end.
Step 1:
Make an APP
Step 2:
Setup a webhook, Make a url on your server and connect it to your webhooks.
$challenge = $_REQUEST['hub_challenge']; $verify_token = $_REQUEST['hub_verify_token']; if( $verify_token == 'abc123' ){ echo $challenge; }
Just put the above code in your method of url you are calling. Make sure the request should be GET on your endpoint.
Step 3:
Once you connect it , YOu can test it by pusing the data to your endpoint by selecting the Leadgen and click on TEST, You will recieve the data on your end. This will be the POST call.
Step 4:
Make sure that you app is connected with your page, If not then you can easily connect it by making a post call of below curl call from graph api explorer.
Make sure the right APP and page selected on this explorer view.
Step 5:
After that you can make the test calls on the link below to test your application.
Step 6:
It might be possible that you don’t have the permissions to read the leads. If it is then you have to
contact your page admins and ask them to give you the permissions.
Final Step:
Now you can get the leads information every time when user will fill the form of lead on your page.
Thanks. If you have any questions you can comment.