Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
thedivergentai avatar

Meta Socials

  • 1 installs
  • 2 repo stars
  • Updated June 11, 2026
  • thedivergentai/divergent-skills

Reference for Meta social auth: choosing between Facebook Login and Instagram Login stacks and their token ladders across Graph API hosts.

About

Documents the two Meta login stacks, three API hosts, and the token exchange ladders for posting to Facebook Pages and Instagram. A developer uses it when integrating Facebook or Instagram Graph API auth and avoiding host/token mismatches.

  • Decision matrix for Facebook Login vs Instagram Login stacks and hosts
  • Token ladders for both paths plus system-user server-to-server tokens

Meta Socials by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #3,830 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/thedivergentai/divergent-skills --skill meta-socials

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
repo stars2
Last updatedJune 11, 2026
Repositorythedivergentai/divergent-skills

What it does

Reference for Meta social auth: choosing between Facebook Login and Instagram Login stacks and their token ladders across Graph API hosts.

Files

references/auth-matrix.mdMarkdownGitHub ↗

Meta Socials Auth Matrix

Two login stacks, three API hosts. Pick one stack per product — mixing hosts on one request breaks auth.

Login Stack Decision

StackHostIG account typeWhen to use
Facebook Logingraph.facebook.comIG Business/Creator linked to FB PagePage posting, IG via Page token, webhooks on Page
Instagram Logingraph.instagram.comIG professional (no FB Page required)Standalone IG apps, creator tools, IG-only scopes

Rule: IG-with-FB-Login never calls graph.instagram.com. IG Login never uses Page tokens from /me/accounts.

API Hosts

HostProtocolUsed for
graph.facebook.comGraph API v21+Users, Pages, IG user via Page, debug_token, OAuth exchange
graph.instagram.comInstagram Graph subsetIG Login user/media/messaging endpoints only
rupload.facebook.comResumable uploadLarge video/Reels binary upload (ig-prefixed upload sessions)

Version prefix: https://graph.facebook.com/v21.0/... — pin version in prod; unversioned tracks latest breaking changes.

Token Ladder (FB Login path)

1. Short-lived user token     OAuth redirect / JS SDK
2. Long-lived user token      GET /oauth/access_token?grant_type=fb_exchange_token
3. Page access token          GET /me/accounts?fields=id,name,access_token
4. IG user id (via Page)      GET /{page-id}?fields=instagram_business_account
5. Publish as Page/IG         Use Page token on graph.facebook.com

System User (Business Manager): server-to-server; generate token in BM → assign assets → never embed in client. Refresh via BM, not user OAuth.

Token Ladder (IG Login path)

1. Authorization code         instagram.com/oauth/authorize
2. Short-lived IG token       POST graph.instagram.com/oauth/access_token
3. Long-lived IG token        GET graph.instagram.com/refresh_access_token
4. API calls                  Bearer on graph.instagram.com only

IG Login tokens cannot access Page endpoints or graph.facebook.com IG nodes.

debug_token (always on failure)

curl -G "https://graph.facebook.com/debug_token" \
  -d "input_token={TOKEN}" \
  -d "access_token={APP_ID}|{APP_SECRET}"

Check: is_valid, expires_at, scopes, granular_scopes, type (USER/PAGE), profile_id (Page id for Page tokens).

App Modes

ModeTokensReview
DevelopmentApp admins/testers onlyNo App Review for listed testers
LiveAny authorized userAdvanced Access + App Review per permission

Expired tester grants → error 190 even when code is correct.

Common Auth Mistakes

MistakeSymptom
User token on /{page-id}/feed(#200) permission
Page token on graph.instagram.comInvalid OAuth
IG Login token on /{ig-user-id}/media via facebook.comWrong host
Unexchanged short-lived token in cron190 after ~1–2 h

Full OAuth fields: `full-docs/graph-api/get-started.md` (≤120 lines). IG Login: `full-docs/instagram-platform/instagram-api-with-instagram-login.md` (≤120 lines).

Related skills

Backend & APIsintegrationsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.