When connecting to Facebook’s API through connectors such as Facebook and Facebook Ads, you need valid credentials that you can obtain when creating a Facebook app.

This page describes how you can create a Facebook app to obtain the necessary credentials you need to import your Facebook data into the ElastiCube Manager.

After you have obtained these credentials, you can add them to your connection string to connect to Facebook’s APIs.

To obtain authentication credentials:

  1. Log into Facebook and navigate to https://developers.facebook.com/apps.
  2. Click + Add a New App.
  3. Define your app’s name and click Create App ID. The Product Setup page is displayed.
  4. Click Add Product.
  5. For the Marketing API,  click Get Started.
  6. Open the Settings page.
  7. In the Settings page, the OAuth client credentials, App Id and App Secret, are displayed.
  8. In the App Domains field, enter localhost.
  9. In the Settings page, click + Add Platform and select Website. The Website area is added to the Settings page.
  10. In the Site URL field, enter http://localhost. This value is represents the callback URL in your connection string where the user will return with the token that verifies that they have granted your app access.
  11. In the bottom-right corner of the Settings page, click Save Changes. Facebook requests that you authenticate your account.
  12. Enter your password to authenticate your account and click OK. Your app is saved.
  13. After you have authenticated your account, you must set permissions for the app to retrieve your data. Open the Facebook Explorer to set your permissions.
  14. In Facebook Explorer, click Get Token > Get User Access Token.
  15. Select the relevant permissions you need and click Get Access Token. Your permissions are now set and you can request the relevant data from Facebook.
    Note: For apps to manage ads, you must be granted the app ads_management or ads_read extended permission. Use ads_read if you only need Ad Insights API access, to pull reporting information. Use ads_management when you need to read, create and update ads. For more information about permissions, click here.

Accessing the Facebook API

Facebook has three levels of access to its Marketing API, which determine how you can use and access data from your Facebook app:

  • Development: Try and test apps with the API.
  • Basic: Test, iterate, build apps with up to 25 external accounts.
  • Standard: Support unlimited accounts and be nominated to Facebook Marketing Partner program.

When you create a Facebook, you are assigned a Development level of access by default. Each access level has its own account and rate limitations. You can modify your level of access by submitting a request to Facebook. Fore more information about these limitations and upgrading your access, click here.

Adding Advertising Account Permissions

In addition to Facebook permissions, if you want to retrieve data from a Facebook Ads account, that is associated with your Facebook account,  you need to add that account’s ID to the app through the Authorized Ad Accounts ID field. This field is where you define which ad accounts are associated with your account and allowed to advertise for your app.

To associate advertising accounts to your account:

  1. Log into Facebook and navigate to https://developers.facebook.com/apps.
  2. Selecting Settings > Advanced.
  3. In the Authorized Ad Accounts ID field, enter the Facebook ID of the accounts that can access your Facebook Ads data.