Facebook Setup
Set up Facebook Pages API integration for managing pages, posts, and engagement through Fp Switchboard.
Prerequisites
Section titled “Prerequisites”- Facebook account with admin access to at least one Facebook Page
- Access to Meta for Developers
Setup Steps
Section titled “Setup Steps”-
Create a Meta App
Go to developers.facebook.com and create a new app. Select “Business” type.
-
Add Facebook Login
In your app dashboard, click “Add Product” and select “Facebook Login”.
-
Add Redirect URI
Under Facebook Login > Settings, add:
https://api.switchboard.fpdigital.ai/oauth/facebook/callback -
Request Permissions
Add the required permissions:
emailpublic_profilepages_show_listpages_manage_postspages_read_engagement
-
Copy Credentials
From Settings > Basic, copy the App ID and App Secret.
Environment Variables
Section titled “Environment Variables”npx wrangler secret put FACEBOOK_CLIENT_IDnpx wrangler secret put FACEBOOK_CLIENT_SECRETRedirect URI
Section titled “Redirect URI”https://api.switchboard.fpdigital.ai/oauth/facebook/callbackCommon Issues
Section titled “Common Issues”- App Review required: Facebook permissions beyond basic profile require app review for production use.
- Page tokens vs User tokens: Facebook uses separate tokens for page management. Switchboard handles the token exchange automatically.
- Rate limits: Facebook Graph API has rate limits that vary by endpoint. Heavy usage may trigger temporary throttling.
Testing
Section titled “Testing”- Connect from the Switchboard Dashboard
- Authorize with your Facebook account
- Select the pages you want to manage
- Click Test Connection to verify
- Try: “List my Facebook pages” or “Show recent posts”