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
- Create a new App in Meta Developer , select
Other -> Business
- Once App is created, click App and get App ID and App secret, then save it somewhere for future usage
- Create a short-live token
- Go to https://developers.facebook.com/docs/pages/access-tokens/ and click
Graph Explorer tool
- 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
- Select Get User Access Token, and connect your account in popup window
- Click
Generate Access Token
and copy the token
- 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"
- 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"
- Register Webhook
- Select your App in Developer
- In left menu bar click
Add Product
and select Webhook - Click Webhook, then select Page from dropdown list and click Subscriber to this object button
- You need to setup a token for this webhook
- Omneo will provide callback Url
- Click verify and Save
- Subscriber to
leadgen
- 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}"
- 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
Updated 26 days ago