Facebook Marketing

Facebook custom audiences

  • API Versionsarrow-up-right - latest v11.0 as of August 2021.

  • Permissions and Scopesarrow-up-right.

  • Base URL: https://graph.facebook.com/<VERSION>/

  • Test Facebook Graph API Playground: https://developers.facebook.com/tools/explorer?method=GET&path=me%3Ffields%3Did%2Cname&version=v12.0

Finding User and Page IDs

You need to know your Facebook User and Page IDs for a few actions, here is how to find them.

User ID

  1. Go to the Facebook Business Integrations settingsarrow-up-right with the Facebook user you used to authenticate with Locoia

  2. Click on View and edit next to the Locoia integration

  3. Scroll to the very bottom to see your user ID.

Facebook User ID in integration settings

Page ID

To find your page ID, you can follow the official Facebook instructionsarrow-up-right (here a direct link to your Facebook pagesarrow-up-right).

Use Cases

Facebook Lead Ads

Retrieving Leads API docs by Facebook can be found herearrow-up-right.

You can find your lead ads forms and form IDs herearrow-up-right.

Rate Limits

200 multiplied by 24 multiplied by the number of leads created in the past 30 days for the Facebook page.

Custom Audience Uploads

You can find your Facebook ad account id on the page herearrow-up-right. It is in the upper right or in the URL. You should replace it in the above URL with {{ ... }}. So a final URL can look like https://graph.facebook.com/v11.0/act_1234567890/ followed by the endpoint, customaudience

circle-exclamation

For app builders: Any app needs at least the scopes ads_management to have access.

1. Creating a custom audience with Curl

2. Adding mobile device data using Curl

Error explanation page can be found herearrow-up-right.

circle-info

If your JSON is malformatted, you will get this error: { "error": { "message" : "(#100) Invalid parameter", "type": "OAuthException", "code": 100,"fbtrace_id": "some id" } }

Endpoints

  • Creating a Custom audience based on CRM or similar data - Customer File Custom Audiencesarrow-up-right. Creating manually as a user, can be found here https://www.facebook.com/adsmanager/audiences?act=xxxxxaccount_id&tool=AUDIENCES&nav_source=business_manager In order to make this endpoint work, you need to connect it with a business.

Last updated

Was this helpful?