Set up Facebook webhook to TaskFlow

Problem

Facebook requires an App to be set up to connect to external webhooks. 

Create an App

Follow the steps below
  1. Go to https://developers.facebook.com/
  2. Create an App

  3. Select the "Webhook" product
  4. Change the dropdown to "Page"
  5. Click the "Subscribe to this object" button
  6. The "Call back URL" is: https://demo.taskflow.co.za/facebook/lead/callback 
    1. Replace "demo" with the name of your TaskFlow server instance
  7. The "Verify token" is: Facebook_leads

  8. Subscribe to "leadgen"
  9. This app will need to be reviewed and Approved by Facebook to be used in Production. Go to "App Review" → "Permissions and Features" → Request advanced access to "leads_retrieval"
    1. Please ensure your Business is Verified
    2. Please complete the ENTIRE application review form
    3. From prior cases, in the "Verification Details" section, simply putting "Currently testing using the following tool: <https://developers.facebook.com/tools/lead-ads-testing>" is enough
  10. Example of a successful request

Set up the Facebook Business account

Follow the steps below
  1. Go to https://business.facebook.com/
    1. Note you will need to have some level of admin access to access this page
  2. Click "More Tools" → "Business Settings"
  3. Click "Pages", ensure that your Facebook Page is added
  4. Click "Integrations" → "Leads Access" → Select the CRM tab → Click Assign CRM → Select your App

Get page access token

Follow the steps below
  1. Refer to Generate Page Access Token (Never Expire)

Install App

Follow the steps below
  1. Go to https://developers.facebook.com/tools/explorer
  2. Paste your Page Access Token into the "Access token" bar
  3. Ensure that your Page has the "Leadgen" permission enabled by setting the query bar to the following (replace {page_id} with your Facebook page ID):
  4. If you make a GET request you should receive the following:

          

Final Step

Please provide the TaskFlow technician with the following details to complete the Facebook Ad Leads integration.

  1.  Your Facebook Page ID
  2. The Page access token (from the previous step)

References

https://developers.facebook.com/docs/marketing-api/guides/lead-ads/

https://developers.facebook.com/docs/graph-api/webhooks/getting-started/webhooks-for-leadgen

https://developers.facebook.com/docs/marketing-api/guides/lead-ads/retrieving/

Contact Support

If none of the solutions solved your issue, please contact us on support@taskflow.co.za and provide us with as much information as possible. Also indicate to us which articles you have gone through in the troubleshooting guide.