Setup Facebook Page and Instagram Business Account using the Meta Graph API to automate - submission content
🛠️ How to Create a Meta App
Go to
Click Create App
Choose Business or None (for internal use)
Fill in basic details: name, email, purpose
Add products:
Facebook Login (for user auth)
Instagram Graph API
Pages API
Generate an App ID and App Secret
Use the Graph API Explorer to test endpoints and generate tokens
you need to Add, use cases for page follwings here:
business_management ,
pages_manage_posts
,instagram_content_publish
,pages_show_list
,instagram_basic
🔐 Token Flow Summary
Use your Meta App to generate a User Access Token
Call
/me/accounts
to get Page Access TokenCall
/page-id?fields=instagram_business_account
to get Instagram IDUse these in your API/FUNCTION/CODE to publish content
🧩 Architecture Overview
🔐 Prerequisites
Facebook App with business_management ,
pages_manage_posts
,instagram_content_publish
,pages_show_list
,instagram_basic
Instagram account must be Business or Creator and linked to a Facebook Page
Store
page_id
,instagram_id
, andaccess_token
securely in Supabase Vault or pass via request body
Via Graph API
Use the and run:
GET /me/accounts
2. Get Your Instagram Business Account ID
Your Instagram account must be:
A Business or Creator account
Linked to a Facebook Page
Then run:
GET /{page-id}?fields=instagram_business_account🔐 3. Get Your Page Access Token
Step-by-Step:
Go to
Select your app
Click Get Token → Get User Access Token
Select permissions:
pages_manage_posts
pages_read_engagement
pages_show_list
instagram_basic
instagram_content_publish