Skip to content
Last updated

Facebook integration

Integrating Facebook with Frontegg lets your application authenticate users with their Facebook account and read profile and page data through the Meta Graph API. You configure the integration by creating a Meta for Developers app with the Facebook Login use case, then providing the App ID, App secret, and Frontegg redirect URL.


Prerequisites

Create a Meta app

Step 1: Open the Meta for Developers apps page

Sign in to the Meta for Developers apps page with your Facebook account. Click Create App to start the app creation flow.

Meta for Developers Apps page with Create App highlighted

Step 2: Add app details

Enter an App name (for example, Frontegg Social Connector) and confirm the App contact email. Meta uses this email for policy notifications, so set it to an address you check regularly. Click Next.

App name restrictions

Meta does not allow app names that contain reserved brand terms like FB, Face, Book, Insta, Gram, or Rift. Choose a neutral name (for example, Frontegg Social Connector) instead.

App details step with Next highlighted

Step 3: Select the Facebook Login use case

On the Use cases step, select Authenticate and request data from users with Facebook Login. This is the standard use case for OAuth integrations that need to read user profile and email. Click Next.

Use cases step with Authenticate and request data from users with Facebook Login highlighted

Step 4: Connect a Business Portfolio

On the Business step, choose the Business Portfolio that will own this app, then click Next. You can connect an unverified portfolio now and complete business verification later when you submit for App Review.

Business portfolio selection step with Next highlighted

Step 5: Review and create the app

Click Next through the Requirements step, review the Overview, then click Create app. Meta may ask you to re-enter your Facebook password to confirm.

Overview step with Create app highlighted

Copy the credentials

Step 6: Find the App ID and App secret

In the app dashboard, navigate to App settings → Basic. The top of the page shows the App ID and App secret. Copy the App ID — this is your Frontegg Client ID. Click Show next to App secret, re-enter your Facebook password when prompted, and copy the value — this is your Frontegg Client Secret.

App settings Basic page with App ID and App secret highlighted

Configure permissions

Step 7: Add the required Facebook Login permissions

Navigate to Use cases → Customize on the Authenticate and request data from users with Facebook Login tile. On the Permissions and features tab, click Add next to each permission you need. public_profile is granted to every app by default, so at minimum add email.

The integration uses the following scopes:

ScopeDescription
public_profileRead the default public profile fields on the user node. Granted by default.
emailRead the user's primary email address.
pages_show_listList the Facebook Pages the user manages.
pages_read_engagementRead page engagement data and posts.
pages_manage_postsPublish, edit, and delete posts on a Page.
pages_read_user_contentRead user-generated content on a Page (comments, ratings).

Pages scopes require additional use cases

The pages_* scopes are not part of the Facebook Login use case. To request them, click Add more to this use case and add the Manage everything on your Facebook Page use case, then add the page permissions from its Permissions and features tab.

Standard access requires App Review

Permissions are initially Ready for testing — they work only for users assigned to the app under App roles → Roles or Test users. To grant access to any Facebook user, submit your app for App Review and request Standard access for each scope.

Permissions and features tab with email and public_profile highlighted

Configure the redirect URL

Step 8: Add the Frontegg redirect URL

In the same Customize use case view, open the Settings tab. Scroll to Valid OAuth Redirect URIs and add your Frontegg redirect URL:

  • https://YOUR_MCP_GATEWAY_URL/integration-callback

Replace YOUR_MCP_GATEWAY_URL with the MCP Gateway URL from the Frontegg portal Settings → Basic configuration page. Press Enter to add the URI as a chip, then click Save changes.

Facebook Login Settings page with Valid OAuth Redirect URIs and Save changes highlighted

Verify the OAuth flow

Open the Facebook OAuth dialog in a new tab to confirm that the redirect URL, App ID, and scopes are wired correctly:

https://www.facebook.com/v24.0/dialog/oauth?client_id=YOUR_APP_ID&redirect_uri=https://YOUR_MCP_GATEWAY_URL/integration-callback&response_type=code&scope=public_profile,email

Facebook should display a consent screen titled "Frontegg Social Connector is requesting access to:" listing Name and profile picture and Email address — this is the screen end users see when authorizing the integration.

Facebook OAuth consent screen showing the requested permissions

Configure the Frontegg portal

Once you have your App ID (Client ID) and App secret (Client Secret), enter them in the Frontegg portal:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Integrations → Facebook.
  2. Enter the Client ID and Client Secret in the corresponding fields.
  3. Select the required scopes.
  4. Click Save.

When a user authorizes the integration, Facebook prompts them to log in and grant the requested permissions to your app.

Keep your credentials secure

Never share or commit your App secret to version control.

Additional resources