Paragon
Search…
Facebook Ads
Connect to your users’ Facebook Ads accounts.

Setup Guide

You can find your Facebook Ads app credentials by visiting your Facebook Developer App Settings.
Note: You'll need to create a new Facebook Ads app if you don't already have one.
You'll need the following information to set up your Facebook Ads App with Paragon Connect:
  • Client ID
  • Client Secret
  • Scopes Requested

Add the Redirect URL to your Facebook Ads app

Paragon provides a redirect URL to send information to your Facebook Ads app. To add the redirect URL to your Facebook Ads app:
1. Copy the link under "Redirect URL" in your integration settings in Paragon. The Redirect URL is:
1
https://passport.useparagon.com/oauth
Copied!
2. Log into your Facebook Developer Portal.
3. Select your app from list of apps.
4. Under Add a product, select Facebook Login.
5. Under Valid OAuth Redirect URIs, paste-in the redirect URL from Paragon. The redirect URL can be found in Step 1.
6. Press the blue Save changes button to confirm your changes.

Add your Facebook Ads app to Paragon

1. Select Facebook Ads from the Integrations Catalog.
2. Under Integrations > Connected Integrations > {YOUR_APP} > Settings, fill out your credentials in their respective sections:
  • Client ID:
    1. 1.
      Log in to your Facebook Ads dashboard.
    2. 2.
      Select your application.
    3. 3.
      Select Settings > Basic from the sidebar.
    4. 4.
      Copy the App ID to use in Paragon Connect.
  • Client Secret:
    1. 1.
      Log in to your Facebook Ads dashboard.
    2. 2.
      Select your application.
    3. 3.
      Select Settings > Basic from the sidebar.
    4. 4.
      Copy your App Secret to use in Paragon Connect.
Press the blue "Connect" button to save your credentials.
Note: Leaving the Client ID and Client Secret blank will use Paragon development keys.

Connecting to Facebook Ads

Once your users have connected their Facebook Ads account, you can use the Paragon SDK to access Facebook Ads on behalf of connected users.
See the Facebook Ads REST API documentation for their full API reference.
Any Facebook Ads API endpoints can be accessed with the Paragon SDK as shown in this example.
JavaScript
1
// You can find your project ID in the Overview tab of any Integration.
2
3
// Authenticate the user
4
paragon.authenticate(<ProjectID>, <Paragon User Token>);
5
6
// Get Campaigns
7
await paragon.request(‘facebookAds’, 'act_<AD_ACCOUNT_ID>/campaigns', {
8
method: 'GET'
9
})
10
11
// Create a Campaign
12
await paragon.request('facebookAds', 'act_<AD_ACCOUNT_ID>/campaigns' , {
13
method: 'POST',
14
body: {
15
name: "My First Campaign",
16
objective: "POST_ENGAGEMENT",
17
status: "PAUSED",
18
special_ad_categories: []
19
}
20
})
Copied!

Building Facebook Ads workflows

Once your Facebook Ads account is connected, you can add steps to perform the following actions:
  • Create Campaign
  • Update Campaign
  • Get Campaigns
  • Get Campaign by ID
  • Create Ad Set
  • Update Ad Set
  • Get Ad Sets
  • Get Ad Set by ID
  • Create Ad
  • Update Ad
  • Get Ad by ID
  • Build Ad Creative Object
  • Create Ad Creative
  • Create Lead Gen Form
  • Send Purchase Event
  • Send Lead Event
  • Send Other Event
When using Facebook Ads, you can reference data from previous steps by typing {{ to invoke the variable menu.