🔐 Facebook Token Helper

Get your Page Access Token - The Easy Way

🔗 Step 0: Configure Webhook (Do This First!)

Go to your Facebook App → Webhooks section and enter:

⚡ Quick Method (Recommended)

Step 1: Get Short-Lived Token

  1. Go to Graph API Explorer
  2. Select your app: newsapp
  3. Click "Generate Access Token"
  4. Grant permissions (allow everything it asks)
  5. Copy the token shown

Step 2: Test It Right Away

⚠️ This token expires in 1-2 hours. Good for testing!

🔄 Get Long-Lived Token (60 days)

Visit this URL in your browser (replace YOUR_TOKEN with the token from Step 1):

https://graph.facebook.com/v18.0/oauth/access_token?grant_type=fb_exchange_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&fb_exchange_token=YOUR_SHORT_TOKEN

Replace: YOUR_APP_ID, YOUR_APP_SECRET (from Facebook App settings), YOUR_SHORT_TOKEN

🔍 Alternative: Use Token Debugger

  1. Go to Access Token Debugger
  2. Paste your short-lived token
  3. Click "Extend Access Token" button at the bottom
  4. Copy the new long-lived token
  5. Update it in Base44 secrets

📋 Final Step: Update in Base44

  1. Copy your token (short or long-lived)
  2. Go to Base44 Dashboard → Settings → Secrets
  3. Find: FACEBOOK_ACCESS_TOKEN
  4. Paste your token and click Save
  5. Test posting from Admin News Manager!
🚨 Still Not Working?

Common Issues:

  • Token expired: Generate a new one from Graph API Explorer
  • Permission denied: Make sure you're logged in as the Page admin
  • Invalid token: Double-check you copied the entire token
  • App not approved: For testing, use tokens from Graph API Explorer

✅ Quick Test:

After updating the token, go to Admin News Manager and click the Share button (📤) on any published article. You should see "Posted successfully" message!