Connecting Meta Ads
Integrate Facebook and Instagram Ads with af-gemini-connect
Overview
Connecting Meta Ads enables powerful advertising automation:
- Campaign creation and management
- Audience targeting and optimization
- Ad creative generation
- Performance monitoring
- Automated budget allocation
This guide walks you through connecting a Meta Ads account with Facebook Login — the fastest and most common way to get a client connected. No Meta Developer app, no manual tokens, and no waiting on App Review.
Prerequisites
Before you begin, ensure you have:
- A Facebook account with access to the ad account, Page, and Pixel you want to connect (this can be the client's own account)
- Facebook Page with publishing permissions
- Instagram Professional Account (optional, for IG ads)
- af-gemini-connect account with integration permissions
Agency admins who need to use the Business Manager fallback (see Step 4 below) will also need a Meta Business Suite account with admin access.
Step-by-Step Connection
1. Open the Meta Ads connection screen
- In af-gemini-connect, go to the client's Ads Hub (or Admin → Integrations → Meta Ads)
- Find the Meta Ads connection card
2. Click "Continue with Facebook"
- Click Continue with Facebook
- A popup window opens asking you to log into Facebook
- Log in with the Facebook account that has access to the ad account, Page, and Pixel — this is usually the client, logging into their own account
- Approve the permissions Facebook asks for
There's nothing to copy or paste. Once login finishes, the connection is live.
3. Let auto-discovery do the work
After login, af-gemini-connect automatically looks up and lists:
- Ad Accounts the logged-in account can access
- Facebook Pages the logged-in account can access
- Pixels tied to those ad accounts
You don't need to type in any IDs by hand. Once discovery finishes, the connection card shows the real Facebook account name and how many ad accounts were found, instead of a generic "connected" badge.
4. Agency admins only: Use agency Business Manager
If a client won't log into their own Facebook account, an agency admin can click Use agency Business Manager instead. This connects through the agency's own Business Manager (the older System User-based method) rather than the client's personal Facebook login. This button only appears for agency admins — a regular team member won't see it.
Re-running this setup later is safe. If a connection is already working — whether it's a manually entered Pixel ID or a working Facebook login — running setup again won't erase or downgrade it.
Connection Health Monitoring
Once connected, monitor your Meta Ads integration in the Integrations dashboard:
- Connection Status: Active/Inactive
- API Limits: Usage vs. rate limits
- Last Sync: When campaign data was last refreshed
- Error Logs: Any API errors or failures
Troubleshooting
Popup blocked or closed before finishing
- Make sure your browser allows popups for af-gemini-connect
- Click Continue with Facebook again and complete the login without closing the popup early
Missing ad accounts or pages
- Confirm the Facebook account you logged in with has admin access to those assets
- Check that the assets are part of the same Business Manager as the ad account
- Try logging out of Facebook and logging back in with the correct account
API rate limit errors
- Review your API usage in the Meta for Developers dashboard
- Implement exponential backoff in your requests
- Request a quota increase if needed
"Use agency Business Manager" isn't visible
- This fallback is restricted to agency admins
- Ask an agency admin to complete the step, or have the client connect using Continue with Facebook instead
Best Practices
- Lead with Facebook Login for most clients — it's faster and keeps access on the client's own account
- Reserve the Business Manager fallback for clients who can't or won't log in themselves, and only agency admins should use it
- Set up proper permission tiers so team members have appropriate access
- Monitor API usage to avoid hitting rate limits
- Regularly review connected assets to ensure they're still active
Next Steps
After connecting Meta Ads, you can:
- Set up automated campaign creation
- Configure audience targeting rules
- Generate ad creatives with AI
- Set up performance monitoring dashboards
- Implement budget optimization algorithms
FAQ
Q: Can I connect multiple Meta Business accounts?
A: Yes, you can connect multiple business accounts, but each client should have their own dedicated connection.
Q: How often does data sync?
A: Sync frequency is configurable from every 15 minutes to daily.
Q: What happens if I disconnect an asset?
A: Disconnecting will stop data collection and may affect automated campaigns.
Q: Are there limits on API calls?
A: Yes, Meta imposes rate limits. Monitor usage in the developer dashboard.
Q: Can I manage Instagram ads without a professional account?
A: No, Instagram ads require a professional account linked to a Facebook Page.
Q: Will running the connection setup again break an existing connection?
A: No. If a connection is already working — a manually entered Pixel ID or a working Facebook login — running setup again won't erase or downgrade it.
