Facebook
Social Installation + User OAuth

Facebook

Manage pages, posts, and ad campaigns on Facebook with installation and user-level OAuth access.

Auth Model

Installation + User OAuth

Dual-credential model. An App is first installed into an organization or workspace (yielding an installation credential), then individual users authorize within that installation context (yielding user credentials). Authpipe manages both lifecycles.

Connection Flow

1
Admin installs App
2
Installation credential stored
3
Users authorize
4
User credentials stored
@authpipe/node
// Get the bot/app token (installation-level)
const { credential: botToken } = await authpipe.getCredential({
  provider: 'facebook',
  tenantId: 'org_acme',
  credentialFor: 'installation',
});

// Get a user-level token
const { credential } = await authpipe.getCredential({
  provider: 'facebook',
  tenantId: 'org_acme',
  userId: 'user_123',
  credentialFor: 'user',
});
// Both credentials are always valid — Authpipe handles refresh
@authpipe/react
// Install the App into a workspace
<InstallButton
  provider="facebook"
  onInstall={(inst) => console.log('Installed!', inst)}
/>

Available Scopes

Permissions you can request when connecting to Facebook.

pages_manage_posts

Create, edit, and delete posts on Pages managed by the app

pages_read_engagement

Read engagement data (likes, comments, shares) on Pages managed by the app

email

Read the user's primary email address

public_profile

Read the user's public profile information

pages_show_list

List Pages the user manages

What Authpipe handles for Facebook

OAuth Orchestration

PKCE, state validation, callback handling, and provider-specific quirks — all automatic.

Encrypted Vault

AES-256-GCM encryption with per-tenant key isolation. OAuth tokens, API keys, and webhook secrets — never exposed to the frontend.

Silent Refresh

Proactive token refresh before expiry. SDK returns from local cache with zero latency.

Health Monitoring

Scheduled checks detect revoked tokens and expired credentials before users notice.

More Social providers

Ready to connect Facebook?

Get your first 100 connections free. Set up in minutes with our SDK.