Instagram Account Linking Troubleshooting
Issue: Instagram Accounts Not Showing in Social Post Creation
Your FBINSTA platform shows "ig_accounts": [] which means no Instagram Business accounts were found linked to your Facebook Page.
🔍 Diagnosis
Based on your platform data:
- ✅ Facebook Page found: "Cici Label" (ID: 747917475065823)
- ❌ Instagram accounts: Empty array
[] - ✅ Access token: Present and valid
🎯 Root Causes
1. Instagram Account Not Linked to Facebook Page
The most common issue is that your Instagram account isn't properly linked to your Facebook Page.
How to Check:
- Go to your Facebook Page: https://facebook.com/CiciLabel
- Click Settings (left sidebar)
- Click Instagram (left sidebar)
- Check if an Instagram account is connected
How to Fix:
- In Facebook Page Settings → Instagram
- Click Connect Account
- Log in to your Instagram account
- Important: Your Instagram account must be a Business or Creator account (not Personal)
2. Instagram Account Type
Instagram Personal accounts cannot be linked to Facebook Pages. You need a Business or Creator account.
How to Convert to Business Account:
- Open Instagram app
- Go to your profile
- Tap the menu (☰) → Settings and privacy
- Tap Account type and tools
- Tap Switch to professional account
- Choose Business or Creator
- Follow the setup steps
3. Missing Facebook App Permissions
Your Facebook app needs specific permissions to access Instagram data.
Required Permissions:
instagram_basic- Access basic Instagram account infoinstagram_content_publish- Publish content to Instagrampages_show_list- List Facebook Pagespages_manage_posts- Manage posts on Pages
How to Check:
- Go to Facebook Developers
- Select your app
- Go to App Review → Permissions and Features
- Check if Instagram permissions are approved
For Development:
- Instagram permissions work in Development mode
- Add your Instagram account as a test user
For Production:
- Submit your app for review
- Request Instagram permissions
4. OAuth Scope Not Requested
The OAuth flow might not be requesting Instagram permissions.
Check your .env file:
FACEBOOK_SCOPE=pages_show_list,pages_manage_posts,pages_read_engagement,instagram_basic,instagram_content_publish
Make sure instagram_basic and instagram_content_publish are included!
🛠️ Debug Tools
1. Use the Debug Endpoint
I've created a debug endpoint to help diagnose the issue:
GET /admin/socials/debug-instagram?platform_id=01K9D25PAZHKTQ2ZYE64VRN1F8
In your browser:
http://localhost:9000/admin/socials/debug-instagram?platform_id=01K9D25PAZHKTQ2ZYE64VRN1F8
This will show:
- Raw Facebook API response
- Parsed Instagram accounts
- Diagnostic information
- Troubleshooting steps
2. Check Server Logs
After re-authenticating, check your server logs for:
[OAuth Callback] Fetched X Facebook pages and Y Instagram accounts
If you see:
[OAuth Callback] No Instagram accounts found. Check if Instagram Business account is linked to Facebook Page.
Then the Instagram account isn't linked properly.
3. Test Facebook Graph API Directly
Use Facebook's Graph API Explorer:
- Go to https://developers.facebook.com/tools/explorer/
- Select your app
- Get a User Access Token with these permissions:
pages_show_listinstagram_basic
- Make this API call:
GET /me/accounts?fields=id,name,instagram_business_account{id,username} - Check if
instagram_business_accountappears in the response
Expected Response:
{
"data": [
{
"id": "747917475065823",
"name": "Cici Label",
"instagram_business_account": {
"id": "17841400008460056",
"username": "cicilabel"
}
}
]
}
If instagram_business_account is missing, the account isn't linked!
✅ Step-by-Step Fix
Step 1: Convert Instagram to Business Account
- Open Instagram app
- Profile → Menu → Settings
- Account → Switch to Professional Account
- Choose Business
- Complete setup
Step 2: Link Instagram to Facebook Page
- Go to Facebook Page Settings
- Click Instagram (left sidebar)
- Click "Connect Account"
- Log in to Instagram
- Authorize the connection
Step 3: Verify Permissions
- Check Facebook app has Instagram permissions
- Update
.envwith Instagram scopes:FACEBOOK_SCOPE=pages_show_list,pages_manage_posts,pages_read_engagement,instagram_basic,instagram_content_publish
Step 4: Re-authenticate FBINSTA Platform
- Go to Settings → Social Platforms
- Open your FBINSTA platform
- Click "Access" or "Connect"
- Click "Log in with FBINSTA"
- Grant all permissions
- Check server logs for success message
Step 5: Verify Instagram Accounts Loaded
- Check the platform's
api_config.metadata.ig_accounts - Should now contain your Instagram account:
{
"ig_accounts": [
{
"id": "17841400008460056",
"username": "cicilabel",
"page_id": "747917475065823"
}
]
}
Step 6: Test Post Creation
- Go to Social Posts → Create
- Select FBINSTA platform
- Instagram Account dropdown should now show your account!
🔗 Helpful Links
- Convert to Instagram Business Account
- Link Instagram to Facebook Page
- Facebook App Permissions
- Instagram Graph API Requirements
📊 Common Scenarios
Scenario 1: Personal Instagram Account
Problem: Instagram account is Personal, not Business Solution: Convert to Business account (see Step 1 above)
Scenario 2: Not Linked to Page
Problem: Instagram Business account exists but not linked to Facebook Page Solution: Link in Facebook Page Settings (see Step 2 above)
Scenario 3: Wrong Facebook Page
Problem: Instagram linked to different Facebook Page Solution:
- Unlink from old page
- Link to correct page (the one in your FBINSTA platform)
Scenario 4: Permissions Not Granted
Problem: OAuth didn't request Instagram permissions Solution:
- Update
FACEBOOK_SCOPEin.env - Re-authenticate platform
Scenario 5: App Not Approved
Problem: Facebook app doesn't have Instagram permissions approved Solution:
- Development: Add Instagram account as test user
- Production: Submit app for review
🎯 Quick Checklist
Before creating a post, verify:
- Instagram account is Business/Creator type
- Instagram account is linked to Facebook Page
- Facebook Page ID matches the one in FBINSTA platform
- Facebook app has Instagram permissions
- OAuth scope includes
instagram_basicandinstagram_content_publish - Platform
api_config.metadata.ig_accountsis not empty - Server logs show "Fetched X Instagram accounts"
💡 Pro Tips
- Use Graph API Explorer to test API calls before debugging code
- Check server logs after OAuth to see what was fetched
- Use the debug endpoint to see raw API responses
- Test with a different Instagram account to isolate the issue
- Verify Page ownership - you must be an admin of the Facebook Page
🆘 Still Not Working?
If you've followed all steps and Instagram accounts still don't appear:
-
Run the debug endpoint:
GET /admin/socials/debug-instagram?platform_id=YOUR_PLATFORM_ID -
Check the response for:
raw_api_response- What Facebook API returnedparsed_ig_accounts- What our code parsedservice_error- Any errors during parsingdiagnostics- Summary of findings
-
Share the debug output to identify the specific issue
-
Verify Instagram account type:
- Open Instagram app
- Go to Settings → Account
- Should say "Business" or "Creator"
-
Double-check the link:
- Go to Facebook Page Settings → Instagram
- Should show your Instagram username
- Try disconnecting and reconnecting
📝 Summary
The empty ig_accounts array means your Instagram Business account isn't linked to your Facebook Page, or the OAuth flow didn't request Instagram permissions. Follow the steps above to:
- ✅ Convert Instagram to Business account
- ✅ Link Instagram to Facebook Page
- ✅ Add Instagram permissions to OAuth scope
- ✅ Re-authenticate FBINSTA platform
- ✅ Verify accounts loaded
After these steps, Instagram accounts will appear in the post creation form! 🎉