Meta Leads Ads

Sync meta ads leads to Omneo automatically

Prerequisites

Omneo

Omneo team need to prepare

  • Prepare Omneo tenant credentials
  • Deploy extension-meta

Meta

  • Meta business account

Meta setup

  1. Create a new App in Meta Developer , select Other -> Business
  2. Once App is created, click App and get App ID and App secret, then save it somewhere for future usage

  1. Create a short-live token
  1. Go to https://developers.facebook.com/docs/pages/access-tokens/ and click Graph Explorer tool
  2. In Graph API Explorer, select your App in Meta App, and add following permissions
  • pages_show_list
  • ads_management
  • ads_read
  • leads_retrieval
  • pages_read_engagement
  • pages_manage_metadata
  • pages_manage_ads

  1. Select Get User Access Token, and connect your account in popup window
  2. Click Generate Access Token and copy the token
  1. Create long-lived token with app id, app secret and short token in previous steps, run curl command below to get long-live token
curl -i -X GET "https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&
  client_id=APP-ID&
  client_secret=APP-SECRET&
  fb_exchange_token=SHORT-LIVED-USER-ACCESS-TOKEN"
  1. Exchange page access token with long-lived token above , you will need to find your page ID. Run curl command below
curl -i -X GET "https://graph.facebook.com/PAGE-ID?
  fields=access_token&
  access_token=USER-ACCESS-TOKEN"
  1. Register Webhook
  1. Select your App in Developer
  2. In left menu bar click Add Product and select Webhook
  3. Click Webhook, then select Page from dropdown list and click Subscriber to this object button
  4. You need to setup a token for this webhook
  5. Omneo will provide callback Url

  1. Click verify and Save
  2. Subscriber to leadgen

  1. Install App to page, use page access token in step 5, and run curl command below
 curl -i -X POST "https://graph.facebook.com/{page-id}/subscribed_apps
  ?subscribed_fields=leadgen
  &access_token={page-access-token}"
  1. When all done, provide Omneo team with
  • long-lived token from step 4
  • page access token from step 5
  • Webhook token from step 6.4