Facebook Login Setup (Correct Approach for FBINSTA)
⚠️ Issue: "Cannot onboard customers at this time"
This message appears because Facebook Login for Business is designed for B2B scenarios where one business onboards other businesses as customers.
For your use case (managing your own accounts), you should use regular Facebook Login.
✅ Correct Setup
Step 1: Use Regular Facebook Login Product
- Go to Facebook App Dashboard
- In Products section (left sidebar)
- If you have "Facebook Login for Business", you can keep it but don't use the config_id
- Make sure you also have regular "Facebook Login" product added
- If not, click Add Product → Facebook Login → Set Up
Step 2: Configure Facebook Login (Regular)
- Go to Facebook Login → Settings
- Add your OAuth Redirect URI:
http://localhost:9000/app/settings/external-platforms/oauth-callback/facebook/callback - Enable these settings:
- ✅ Client OAuth Login: Yes
- ✅ Web OAuth Login: Yes
- ✅ Use Strict Mode for Redirect URIs: Yes
Step 3: Add Yourself as Developer/Tester
This is the key step to avoid "Invalid Scopes" error!
- Go to Roles → Roles (left sidebar)
- Add yourself in one of these roles:
Option A: Add as Administrator (Recommended)
- Click Administrators tab
- Click Add Administrators
- Enter your Facebook account
- Administrators can use all permissions in Development mode
Option B: Add as Tester
- Click Testers tab
- Click Add Testers
- Enter your Facebook account
- You'll need to accept the invitation
Step 4: Request Standard Permissions
For Development mode with test users/admins, you can use these permissions without app review:
Standard Permissions (No Review Needed):
- ✅
pages_show_list - ✅
pages_manage_posts - ✅
pages_read_engagement
Instagram Permissions (Need Special Setup):
- ⚠️
instagram_basic- Requires test user/admin OR app review - ⚠️
instagram_content_publish- Requires test user/admin OR app review
Step 5: Remove config_id from Code
The config_id parameter is for B2B onboarding. For personal use, don't include it.
Already done in the code! The config_id is now commented out.
Step 6: Test Authentication
- Make sure you're added as Admin or Tester
- Restart your server
- Go to Settings → Social Platforms → FBINSTA
- Click "Access" → "Log in with FBINSTA"
- You should see the standard Facebook login (not the business onboarding flow)
- Grant permissions
🔍 Two Approaches for Instagram Permissions
Approach 1: Without Instagram Permissions (Current Setup)
Scope: pages_show_list,pages_manage_posts,pages_read_engagement
What works:
- ✅ Authenticate successfully
- ✅ Fetch Facebook Pages
- ❌ No Instagram accounts (empty array)
- ✅ Can publish to Facebook only
Use this if:
- You want to test Facebook functionality first
- You're still setting up Instagram Business account
- You want to avoid the Instagram permissions complexity
Approach 2: With Instagram Permissions (Requires Setup)
Scope: pages_show_list,pages_manage_posts,pages_read_engagement,instagram_basic
Requirements:
- ✅ You're added as Admin or Tester in the app
- ✅ Instagram account is Business/Creator type
- ✅ Instagram is linked to Facebook Page
- ✅ App is in Development mode
What works:
- ✅ Authenticate successfully
- ✅ Fetch Facebook Pages
- ✅ Fetch Instagram accounts
- ✅ Can publish to both Facebook and Instagram
📊 Current Code Configuration
Your code is now set to:
- ✅ No
config_id(correct for personal use) - ✅ Scope:
pages_show_list,pages_manage_posts,pages_read_engagement - ✅ API version: v24.0
To add Instagram permissions:
Edit facebook-service.ts line 26:
// Add instagram_basic to the scope
const defaultScope = "pages_show_list,pages_manage_posts,pages_read_engagement,instagram_basic";
🐛 Troubleshooting
Error: "Cannot onboard customers at this time"
Cause: Using config_id parameter (Facebook Login for Business)
Solution:
- ✅ Already fixed! The config_id is commented out
- Re-authenticate and you won't see this message
Error: "Invalid Scopes: instagram_basic"
Cause: You're not added as Admin/Tester in the app
Solution:
- Go to App Dashboard → Roles
- Add yourself as Administrator or Tester
- Accept invitation (for Testers)
- Re-authenticate
Instagram Accounts Not Showing
After successful authentication:
- Check if you added
instagram_basicto the scope - Verify Instagram account is Business type
- Verify Instagram is linked to Facebook Page
- Check server logs for errors
📋 Complete Setup Checklist
For Facebook Pages Only (No Instagram)
- Regular Facebook Login product added
- OAuth redirect URI configured
- You're added as Admin or Tester
- Scope:
pages_show_list,pages_manage_posts,pages_read_engagement - No
config_idin OAuth URL - Re-authenticate
For Facebook Pages + Instagram
- Regular Facebook Login product added
- OAuth redirect URI configured
- You're added as Admin or Tester
- Instagram account is Business/Creator type
- Instagram is linked to Facebook Page
- Scope includes
instagram_basic - No
config_idin OAuth URL - Re-authenticate
🎯 Recommended Approach
For immediate testing:
- Keep current setup (no Instagram permissions)
- Add yourself as Administrator in App Roles
- Re-authenticate FBINSTA platform
- Test Facebook posting first
- Then add Instagram once Facebook works
To add Instagram later:
- Convert Instagram to Business account
- Link Instagram to Facebook Page
- Add
instagram_basicto scope in code - Re-authenticate
- Instagram accounts will be fetched!
🔗 Key Differences
| Facebook Login | Facebook Login for Business |
|---|---|
| ✅ Personal account access | ❌ B2B customer onboarding |
| ✅ Own Pages/IG accounts | ❌ "Cannot onboard" message |
| ✅ No config_id needed | ❌ Requires config_id |
| ✅ Standard OAuth flow | ❌ Business onboarding flow |
| ✅ Use this! | ❌ Not for your use case |
💡 Summary
The "cannot onboard customers" message is because you were using Facebook Login for Business (B2B) instead of regular Facebook Login (personal use).
Fixed by:
- ✅ Removing
config_idparameter - ✅ Using regular Facebook Login OAuth flow
- ✅ Adding yourself as Admin/Tester in app
Next steps:
- Add yourself as Administrator in App Dashboard → Roles
- Re-authenticate FBINSTA platform
- Should work without the onboarding message! 🎉
For Instagram:
- Add
instagram_basicto scope when ready - Make sure Instagram is Business type and linked to Page
- Re-authenticate to fetch Instagram accounts