Meta API Setup

Connect Facebook & Instagram to enable auto-posting

⚠️

Credentials incomplete

Follow the steps below, then restart the service.

Current Credential Status

META_ACCESS_TOKEN ✗ Missing
FACEBOOK_PAGE_ID ✗ Missing
INSTAGRAM_BUSINESS_ID ✗ Missing

Step-by-Step Guide

1

Create a Meta Developer App

  1. Go to developers.facebook.com
  2. Click My Apps → Create App
  3. Choose type: Business
  4. Name it e.g. T&A Social Scheduler
2

Add Products & Request Permissions

  1. In the app dashboard, click Add Product
  2. Add Facebook Login and Instagram Graph API
  3. Under App Review → Permissions, request:

pages_manage_posts

pages_read_engagement

instagram_basic

instagram_content_publish

Note: For testing you can use your own account without App Review approval.

3

Get Your Page Access Token & Page ID

  1. Go to developers.facebook.com/tools/explorer
  2. Select your app from the dropdown
  3. Click Generate Access Token and log in with Facebook
  4. Grant the permissions listed above
  5. Run this in the explorer to get your Page token and ID:
GET /me/accounts

Copy the access_token and id for your Page.

Make it long-lived (60 days) — run this:

GET /oauth/access_token?grant_type=fb_exchange_token&client_id=APP_ID&client_secret=APP_SECRET&fb_exchange_token=SHORT_TOKEN

4

Get Your Instagram Business Account ID

  1. Make sure your Instagram is a Business or Creator account
  2. Link it to your Facebook Page: Instagram → Settings → Linked Accounts
  3. In Graph Explorer, run:
GET /{page-id}?fields=instagram_business_account

The id in the response is your Instagram Business ID.

5

Add Credentials to Your Server

SSH into your VPS and open the env file:

nano /root/social-scheduler/.env

Fill in your values:

META_ACCESS_TOKEN=your_long_lived_page_token

FACEBOOK_PAGE_ID=your_page_id

INSTAGRAM_BUSINESS_ID=your_instagram_business_id

Then restart the scheduler service:

systemctl restart social-scheduler

After restarting, refresh this page — all three credentials should show ✓ Configured.

⚠️ Token Renewal Reminder

Long-lived Page tokens last ~60 days. Set a calendar reminder to renew your token before it expires, or use a System User token (never expires) via Meta Business Manager.