Connecting to Facebook

The following are optional connection properties:

  • Target: Some Facebook tables can be filtered by a target. For example, to retrieve comments on a video, specify the Id of the video as the target. This property enables you to restrict the results of all queries in the connection to records that match the specified target. You can also specify this restriction per query with the Target column.

  • AggregateFormat: The provider returns some columns as a string aggregate. For example, the available likes data for an entity is returned in aggregate. By default, the provider returns aggregate columns in JSON. You can also return aggregates in XML.

  • Version: Set this property to the Facebook API version if you need to work with a different version than the default.

Authenticating to Facebook

Facebook uses the OAuth standard to authenticate users.


In all OAuth flows, you must set AuthScheme to OAuth. The sections below assume that you have done so.

See Creating a Custom AzureAD App for information about creating custom applications.


  • InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to avoid repeating the OAuth exchange and manually setting the OAuthAccessToken.

  • OAuthClientId: (custom applications only) Set this to the client Id in your application settings.

  • OAuthClientSecret: (custom applications only) Set this to the client secret in your application settings.

  • CallbackURL: Set this to the Redirect URL in your application settings.

  • Scope (optional): Set this if you need to customizie the permissions that the driver requests.

  • AuthenticateAsPage (optional): Set this to a page name or Id to make requests as a page. The page must be managed by the authenticated user.

When you connect the provider opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The provider then completes the OAuth process:

  1. Extracts the access token from the callback URL.

  2. Obtains a new access token when the old one expires.

  3. Saves OAuth values in OAuthSettingsLocation. These values persist across connections.

Last updated