# ============================================ # SOCIAL MEDIA PUBLISHER PLUGIN CONFIGURATION # ============================================ # # Copy this file to .env and configure your social media credentials # This file is loaded automatically by the Social Media Publisher plugin # # Priority: Plugin .env > Root .env > Defaults # # ============================================ # =========================== # Facebook/Meta OAuth # =========================== # Get from: https://developers.facebook.com/apps/ # App Dashboard → Settings → Basic → App ID & App Secret # # Required Permissions: # - pages_show_list # - pages_manage_posts # - pages_read_engagement # - read_insights # - business_management # - instagram_basic # - instagram_content_publish # - instagram_manage_comments # Facebook App ID FACEBOOK_CLIENT_ID=your-facebook-app-id # Facebook App Secret FACEBOOK_CLIENT_SECRET=your-facebook-app-secret # =========================== # OAuth Token Encryption # =========================== # Required for secure storage of OAuth tokens # Generate with: openssl rand -hex 32 # Or: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))" OAUTH_ENCRYPTION_KEY=your-32-byte-hex-encryption-key # =========================== # Cron Job Authentication # =========================== # Secret key to authenticate scheduled publishing requests # Generate with: openssl rand -base64 32 # # Used by: POST /api/v1/cron/publish-scheduled # Header: Authorization: Bearer CRON_SECRET=your-cron-secret-key-here # =========================== # Quick Setup Guide # =========================== # # 1. Create Facebook App: # - Go to https://developers.facebook.com/apps/ # - Create new app → Type: Business # - Add Facebook Login & Instagram API products # # 2. Configure OAuth Redirect URI: # [YOUR_APP_URL]/api/v1/plugin/social-media-publisher/social/connect/callback # # 3. Generate encryption key: # openssl rand -hex 32 # # 4. Generate cron secret: # openssl rand -base64 32 # # 5. For Vercel Cron (see vercel.json): # - Add CRON_SECRET to Vercel Environment Variables # - Cron runs every 5 minutes by default # # ⚠️ NEVER commit .env to git - it contains secrets!