🛠️ How to Create a Meta App

  1. Go to

  2. Click Create App

  3. Choose Business or None (for internal use)

  4. Fill in basic details: name, email, purpose

  5. Add products:

    • Facebook Login (for user auth)

    • Instagram Graph API

    • Pages API

  6. Generate an App ID and App Secret

  7. Use the Graph API Explorer to test endpoints and generate tokens

  8. you need to Add, use cases  for page follwings here:

  9. business_management , pages_manage_postsinstagram_content_publishpages_show_listinstagram_basic



🔐 Token Flow Summary

  • Use your Meta App to generate a User Access Token

  • Call /me/accounts to get Page Access Token

  • Call /page-id?fields=instagram_business_account to get Instagram ID

  • Use 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, and access_token securely in Supabase Vault or pass via request body


🆔 1. Get Your Facebook Page ID

 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:

  1. Go to

  2. Select your app

  3. Click Get TokenGet User Access Token

  4. Select permissions:

    • pages_manage_posts

    • pages_read_engagement

    • pages_show_list

    • instagram_basic

    • instagram_content_publish