Facebook Ads

Learn the required and optional properties of creating a Facebook Ads Connection, Credential, and Read Connector.

🚧

This connection, developed in partnership with CData, is currently in Private Preview. The below documentation may be incomplete and is subject to change.

For additional information, see CData JDBC documentation.

Prerequisites

  • Facebook Ads OAuth via Ascend OAuth
  • Table name

Setting Up Facebook Ads OAuth via Ascend OAuth

Facebook Ads OAuth Application setup for access via Ascend OAuth

Step 1: Access the Facebook developer portal.

Step 2: Create a new app.

  • Select on My Apps>Create App.
  • Select Other for use case and then select Next.
  • Choose Business as the App type and proceed.

Step 3: Enter the app details.

  • Enter an App name and App Contact Email.
  • Optionally, select a Business Account.

Step 4: Facebook Login for Business Setup.

  • Add Facebook Login for Business product.
  • In Client OAuth Settings, add the Callback URL https\://${ascendHost}/oauth/callback to 'Valid OAuth Redirect URIs.
  • Save changes.

Step 5: Enable the Marketing API.

  • In the app interface, locate and set up Marketing API.
  • Create a new Sandbox Account under Marketing API > Tools.

Step 6: Retrieve App Credentials.

  • In Settings>Basic, note down the App ID and App Secret.
  • Ensure no extra spaces are copied with the credentials.

Connection Properties

The following table describes the fields available when creating a new Facebook Ads Connection. Create a connection using the information below and these step-by-step instructions.

FieldRequiredDescription
Access TypeRequiredThis connection type is Read-Only.
Connection NameRequiredInput your desired name.
Requires CredentialsRequiredThis connection requires credentials.

Advanced

FieldRequiredDescription
AutoCacheOptionalAutomatically caches the results of SELECT queries
CacheMetadataOptionalCache the table metadata.
SSL CertOptionalIf using an SSL connection, specify the SSL certificate to be accepted from the server. Any other certificate that is not trusted is rejected. See formatting options.
Custom Connection PropertiesOptionalAdditional connection properties (ex. key=value, one pair per line)
Concurrent Jobs LimitOptionalMaximum number of jobs that can run concurrently utilizing this connection

Credential Properties

The following table describes the fields available when creating a new Facebook Ads credential. We strongly recommend setting up OAuth2 integration.

FieldRequiredDescription
Credential NameRequiredThe name to identify this credential with. This credential will be available as a selection for future use.
Credential TypeRequiredThis field will automatically populate with Facebook Ads.
Account IdOptionalThe ID of your ad account. If none is specified, we use the first ad account id returned from Facebook Ads.
Authenticate As PageOptionalThe name or Id of a page to authenticate as when making requests to Facebook.

OAuth2 integration (recommended)

Step 1: *OAuth2 Option Selection

  • Select "OAuth2" for authorization type in the Facebook Ads connector credentials.

Step 2: Credential Entry

  • Enter the Facebook App ID and App Secret as the Client ID and Client Secret.
  • Default scopes are provided, but can be modified if needed.
  • Click "Get OAuth Code" to start the OAuth dialog.

Step 3: Complete OAuth Process

  • Accept permissions in the OAuth dialog.
  • After completion, the dialog closes, and the button changes to indicate the "OAuth Code Ready".
  • Ascend.io will exchange the code for the long-lived access token during creation and automatically refresh the token before it expires until the credential is deleted.

Read Connector Properties

The following table describes the fields available when creating a new Facebook Ads Read Connector. Create a new Read Connector using the information below and these step-by-step instructions.

FieldRequiredDescription
NameRequiredProvide a name for your connector. We recommend using lowercase with underscores in place of spaces.
DescriptionOptionalDescribes the connector. We recommend providing a description if you are ingesting information from the same source multiple times for different reasons.
Account IDOptionalOverrides the Account ID created in the Connection credential.
Table NameRequiredTable Name to load.
Replication StrategyOptionalFull Resync, Full Resync in Parallel, Incremental Column, Table Snapshot, or Table Snapshot in Parallel. See Replication Strategies for Databases for more information.
Filter ExpressionOptionalDefine a filter expression to be applied when querying the source table, utilized within the WHERE clause in SQL