Facebook Authentication Guide
  • Dark
    Light

Facebook Authentication Guide

  • Dark
    Light

Overview

This is a step-by-step guide to creating an OAuth entry, acquiring credentials, and authorizing the Facebook Query and Facebook Ads Query connectors for use in Matillion ETL.

Important Information

  • These connectors use an OAuth for third-party authentication.
  • While connector properties may differ between cloud data warehouses, the authentication process remains the same.
  • OAuth tokens will eventually expire and require remaking. This is outside of Matillion's control. However, existing tokens may be extended or refreshed at any time.
  • A new Facebook App should always be used when following this authentication process.
  • The callback URL, and therefore the Matillion ETL instance, must be HTTPS, not HTTP.



Creating an OAuth entry in Matillion ETL

1. In Matillion ETL, on the top left, click Project, then Manage OAuth.

Project dropdown menu

Please Note

If either connector has already been added to an Orchestration Job, the Manage OAuth dialog can also be accessed using the following method:

  1. Click the component's icon and then click the Properties tab at the bottom of Matillion ETL.
  2. Click next to the Authentication property, and click Manage in the pop-up dialog.

2. In the Manage OAuth dialog, copy the Callback URL in the field at the top of the dialog as this will be required in Acquiring Third-Party Credentials.

3. Click in the bottom left to open the Add OAuth Entry dialog.

New OAuth entry

4. Provide a name for the OAuth in the Name field. Click the Service drop-down menu and select the Facebook service you are connecting to: Facebook to connect to Facebook Query, or Facebook Ads to connect to Facebook Ads Query. Then click OK. For the purpose of this example, we have selected Facebook.

Create OAuth Entry window

5. On returning to the Manage OAuth dialog, check the list of OAuths to make sure the new entry is listed.

New Entry listed on Manage OAuth window

Please Note

This entry is Not Configured. Configuration of the OAuth entry will be discussed in Authorizing for use in Matillion ETL.




Acquiring third-party credentials

1. Navigate to the Facebook Developer Portal (also known as Meta for Developers), click Log In on the top-right of the screen, and enter valid login credentials. Log In will be replaced on the menu by My Apps. Click My Apps to open your Apps page.

Developer portal

2. Click Create App at the top-right of the Apps page.

Apps screen

3. On the Select an app type screen, select the Business type, then click Next.

App type screen

4. On the Add details screen, provide details for the following fields, then click Create App:

  • Display name – provide a name for the app, which will be used to identify it on the Apps page.
  • App Contact Email – provide a contact email within your organization, to receive notifications and other communications regarding the app.
  • Business Account – From the drop-down list, select the business account that the app will be connected to. This is optional so it is normally fine to leave this field showing No Business Account selected, but certain app features will require the app to be connected to a business account.

App details screen

Please Note

Facebook will request you to re-enter your password as a security check before moving on to the next step.


5. The browser will now show the Add Products to Your App screen. Locate the Facebook Login product, and click Set Up.

Add products screen

6. The Quickstart wizard will open. Use this to add Facebook Login to the app. Begin by selecting a platform for the app.

Choose app platform

7. The wizard will reload with a block featuring a series of platform-specific questions and configurations. Follow the prompts and provide the required details. The details will vary depending on which platform you chose in the previous step. For this example, we have chosen Web.

Product Quickstart Details

8. Next, click on Facebook Login, then Settings on the sidebar to open the Client OAuth Settings dialog. In the Valid OAuth Redirect URIs field, paste the Callback URL (copied from the Manage OAuth dialog in Matillion ETL earlier). Click Save changes in the bottom-right of the dialog.

Client OAuth settings

9. At the top of the Client OAuth Settings dialog there is a red warning box informing you that your app currently has standard access to "public_profile". In order to use Facebook Login you'll need to gain advanced access to public profiling. To do this, click Get Advanced Access.

Gaining advanced access

10. On the Permissions and Features screen, scroll down to locate public_profile and click Get Advanced Access next to it.

Get advanced access

11. In the Confirm Advanced Access dialog, click to agree to the allowed data usage policy and then click Confirm. Enter your account password when prompted.

confirm advanced access

Please Note

After confirmation you'll be returned to the Permissions and Features dialog, where you'll be able to see your app's public profile setting, with the access level set to "Advanced Access".


12. Click Settings on the sidebar, and click Advanced. Scroll down to the Domain Manager section of the page to add a domain to the new app.

Advanced settings

13. Click Add a Domain on the right of the screen to open the Add a Domain pop-up dialog.

Add a domain

14. In the Add a Domain dialog, copy and paste the URL of Matillion ETL, and click the Exact Match radio button. Ensure that both the HTML and JavaScript and CSS options are selected. Then click Apply.

Apply the domain

15. Click Add Product next to Products in the sidebar to return to the Add Products to Your App screen. In the list of products available for your app, find Marketing API, and click Set Up. This will take you to the Welcome to Marketing API page, but no further configuration is required here.

Return to Add Products

16. Click Settings then Basic on the sidebar and copy the codes from both the App ID and App Secret fields. These will be required in Authorising for use in Matillion ETL.

Please Note

  • In order to copy the App Secret, first click Show and enter your account password when prompted.
  • When copying the codes, some browsers may add a space to the end of the code. Watch out for this as it will cause the credentials to fail.



Authorizing for use in Matillion ETL

1. Return to the Manage OAuth dialog in Matillion ETL, and click next to the previously created OAuth entry. This will open the Configure OAuth dialog.

Configure OAuth settings

2. Using the codes copied from the Facebook Developer Portal earlier, provide details for the following fields:

  • Client ID — enter the App ID.
  • Client Secret — enter the App Secret, then click Next.

Configure OAuth settings

3. The next dialog will have an Authorization link. Click the link to authorise Matillion ETL to use the acquired credentials.

Authorization link

4. The browser will redirect to a Facebook dialog, requiring confirmation of the associated account. Click Continue as <Account Name> to confirm.

Facebook user confirmation

5. The next dialog will request access to a number of Facebook features. Click Continue to confirm.

Allow access to Facebook account

6. If all is successful, the browser will return to Matillion ETL with a dialog message stating, "Authorization Successful".

OAuth Authorization successful