Connecting Meta (Facebook + Instagram)
Reading time: 12 minutes. Hands-on time: 15 minutes. What you'll have at the end: Auto-publish to your Facebook page and Instagram business account. Performance data from your ads flows back into Scarif One's AI memory so it learns what works.
This is the longest of the integration tutorials because Meta's developer setup is genuinely fiddly. Don't skip steps. Read each one before doing it. Most stuck-customer support tickets come from tab-skipping here.
This tutorial assumes you've finished 01 โ Getting started.
Why connect Meta
Without it, Scarif One generates ad creative beautifully but you have to manually upload each one to Meta Ads Manager.
With it:
- Click Publish on any generated ad โ it lands on your Facebook Page and Instagram as a draft (or scheduled, or live, your choice)
- Performance data (impressions, CTR, CPM, conversions) flows back into the dashboard within minutes
- The AI learns from your top performers โ every "good" ad makes the next one a little better
- Auto-pause kicks in for ads that hit your spend cap
- Lookalike audiences, custom audiences, retargeting all work from the dashboard
Step 1 โ Make sure your Instagram is a Business account linked to a Page
This is the #1 blocker we see. Before you start the developer setup, verify:
- Open Instagram on your phone.
- Go to your profile โ โฐ menu (top-right) โ Settings and privacy โ Account type and tools.
- You should see Account type: Business (or Creator). If it says Personal, change it now โ pick Business and choose a category.
- While you're here: tap Connected accounts โ make sure your Facebook Page is linked.
Don't have a Facebook Page yet? Create one at
https://www.facebook.com/pages/createfirst. It takes 2 minutes. You need a Page (not just a personal profile) for any business publishing on Meta.
Step 2 โ Create a Meta Developer App
- Open
https://developers.facebook.comin your browser. - Sign in with your Facebook personal account (the one that owns the Business Manager โ usually your main one).
- Click My Apps in the top-right โ Create App.
- Use case: Other. Click Next.
- App type: Business. Click Next.
- App name:
Scarif One(or your business name + "Marketing"). - App contact email: your email.
- Business Manager account: pick the one that owns your Page + IG.
- Click Create app. Solve the captcha. You're now on the new app's dashboard.
You don't need to copy any IDs yet. We'll use the system-user flow next, which is more secure than personal tokens.
Step 3 โ Open Business Settings
- Open
https://business.facebook.com/settingsin a new tab. - Make sure the dropdown in the top-left shows the right business โ not "personal." If you only see Personal, you don't have a Business Manager yet โ go to
https://business.facebook.com/overviewand create one. - You're now in Business Settings.
Step 4 โ Create a System User
System users are non-human accounts that hold long-lived tokens. Use these instead of personal access tokens โ your personal token expires every 60 days; a system user token can be permanent for verified businesses.
- In Business Settings left sidebar, scroll to Users โ System users.
- Click Add (top-right).
- Name:
Scarif One. - Role: Admin. (Employee role works too but admin is simpler.)
- Click Create system user.
The system user is now created.
Step 5 โ Grant the system user access to your assets
The system user exists but has no permissions. Now we add the Page and Instagram as accessible assets.
-
Still in Business Settings โ Pages (in left sidebar under Accounts).
-
Click your Page in the list.
-
Click Add People.
-
Pick the Scarif One system user from the dropdown.
-
Toggle Manage Page ON.
-
Click Assign.
-
Now do the same for Instagram: Business Settings โ Instagram accounts โ your account.
-
Click Add People โ pick the Scarif One system user โ toggle Content ON โ Assign.
Don't see your Instagram account here? It's because it's not linked to the Business Manager. Go to your Page โ Settings โ Linked accounts โ Instagram โ connect.
Step 6 โ Generate the access token
- Back to Business Settings โ System users โ click Scarif One.
- Click Generate New Token.
- Pick the app you created in Step 2 (Scarif One).
- Token expiration: Never if your business is verified, otherwise 60 days (and set a calendar reminder to rotate).
- Permissions โ tick exactly these seven:
| Permission | What it unlocks |
|---|---|
pages_manage_posts | Publish posts to your Page |
pages_read_engagement | Read post metrics + engagement |
instagram_basic | Read your IG account info |
instagram_content_publish | Publish posts and reels to IG |
ads_management | Create + manage Meta Ads campaigns |
ads_read | Pull performance data |
business_management | Read Page + IG metadata |
Don't tick others. Extra scopes invite rejection during App Review. The seven above are exactly what Scarif One uses โ no more, no less.
- Click Generate Token.
- COPY THE TOKEN IMMEDIATELY. It starts with
EAAโฆand is about 200 characters long. Paste it into a notes app.
The token is only shown once. If you close the dialog without copying it, click Generate Token again to get a new one (this revokes the old one).
Step 7 โ Find your Page ID
- Business Settings โ Pages โ click your Page.
- The right panel shows the Page ID (long number, ~15 digits).
- Copy it.
Alternative: open your Page on facebook.com, click About, scroll to "Page transparency" section. Page ID is shown there too.
Step 8 โ Find your Instagram User ID
This one's not in the UI. We use Meta's Graph Explorer:
- Open
https://developers.facebook.com/tools/explorer/. - Application: pick your Scarif One app (top-right dropdown).
- Access token: paste the system-user token from Step 6.
- Query field: type
{PAGE_ID}?fields=instagram_business_accountโ replacing{PAGE_ID}with the ID from Step 7. - Click Submit.
You'll see JSON like:
{
"instagram_business_account": {
"id": "17841457836089903"
},
"id": "102982326061684"
}
The instagram_business_account.id is your Instagram User ID. Copy it.
Got
nullor empty response? Your IG isn't linked to the Page (Step 1). Or your token is missinginstagram_basicscope (Step 6). Re-do those.
Step 9 โ Connect inside Scarif One
- Scarif One โ ๐ Integrations โ Meta (Facebook + Instagram) card โ Connect.
- Three fields:
| Field | Paste |
|---|---|
| Facebook Page ID | From Step 7 |
| Instagram User ID | From Step 8 |
| Access token | From Step 6 |
- Click ๐ Test connection.
Within ~5 seconds you'll see:
โ Connection works Connected to Acme Coffee + @acmecoffee โ all scopes verified. First sync: Page: Acme Coffee ยท IG: @acmecoffee
- Click โ Save + connect.
You're done.
Troubleshooting
"OAuthException 200 โ page access not allowed"
System user doesn't have access to the Page. Did you do Step 5 (Add People โ Manage Page ON)?
Fix: Business Settings โ Pages โ your page โ check the People list. If "Scarif One" isn't there, add it.
"instagram_business_account is null"
Your IG isn't connected as a Business/Creator account on the Page.
Fix:
- In IG mobile app: Settings โ Account โ Switch to Professional account. Pick Business (or Creator).
- Then connect to your Facebook Page (Settings โ Account โ Connected accounts โ Facebook).
- Wait 2 minutes for Meta to propagate the link.
- Test again in Scarif One.
"Token expired after 60 days"
You picked 60 days in Step 6 instead of Never. The Never option only appears for verified businesses (the green tick).
Fix (verified business): Generate a new system-user token with Never expiration.
Fix (unverified business): Set a calendar reminder for day 50 to rotate. Or apply for verification at Business Settings โ Security Center โ Business verification (takes 2-7 days, requires utility bill + ID).
"ads_management scope rejected"
Meta requires App Review for ads_management on production. Until you pass review, this scope only works for the system user that owns the app.
Fix (development mode is fine for now): the system user token works for that user. You can generate ads + post organically without ads_management. The first time you try to launch a paid ad, Meta will return a clear error and you submit for App Review.
App Review takes 3-5 business days. You provide:
- A screen recording of your app using the scope
- A privacy policy URL (must be live + publicly accessible)
- A description of how the scope is used
Most marketing apps pass on first submission. We have a template for the App Review submission โ ask in /admin/help and we'll send it.
"Can't access Business Settings โ only Personal"
You don't have a Business Manager yet.
Fix: Open https://business.facebook.com/overview โ Create Account. Use your business email. This gives you a Business Manager linked to your personal Facebook profile. Then re-do steps 3-5.
"Page already added to a different Business"
A Page can only belong to one Business Manager at a time.
Fix: Either move the Page to your Business Manager (requires the original BM admin to release it), or use the BM that already has the Page.
What changes in Scarif One after Meta connects
/publishโ generated ads can now publish straight to FB + IG with a click/create/ad-creativesโ every generated ad gets a "Publish to Meta" button/analyticsโ performance data starts flowing back within hours of your first published ad/competitiveโ Meta Ad Library scans become available for your competitors/cross-postโ single-click cross-post for organic content (FB + IG simultaneously)
Token rotation reminders
The dashboard shows a banner 7 days before your token expires (if you picked 60 days). Click the banner โ re-generate in Business Settings โ paste the new token in Scarif One.
If you let it expire, all Meta features pause silently. The dashboard banner becomes red. Generation still works โ only publishing breaks.
Where to next
- Tutorial 04 โ Your first ad, the deep dive
- Tutorial 11 โ The dashboard tour (now that you have store + Meta connected, more tiles unlock)
- Tutorial 14 โ Personas โ test ads on synthetic customers before publishing