Setup Guide

Follow these steps to configure Facebook and Instagram API access for your application

Step 1: Create Facebook App
Set up a Facebook Developer account and create an app
  1. Go to Facebook Developers
  2. Click "My Apps" and then "Create App"
  3. Select "Consumer" as the app type
  4. Enter your app name and contact email
  5. Click "Create App"
Required for both Facebook and Instagram access
Step 2: Configure Facebook Login
Enable Facebook Login for your application
  1. In your Facebook App dashboard, click "Add Product"
  2. Select "Facebook Login" and choose "Web"
  3. Enter your website URL:instabook.yggbranch.dev
  4. In Facebook Login settings, add this OAuth redirect URI:instabook.yggbranch.dev/api/auth/callback/facebook
  5. Request these permissions:
    • email
    • public_profile
    • user_photos
    • user_videos
Step 3: Configure Instagram Basic Display
Enable Instagram access for your application
  1. In your Facebook App dashboard, click "Add Product"
  2. Select "Instagram Basic Display"
  3. Add this OAuth redirect URI:instabook.yggbranch.dev/api/auth/callback/instagram
  4. Under "User Token Generator," add Instagram test users
  5. Request these permissions:
    • user_profile
    • user_media
Step 4: Environment Variables
Configure your application with the API credentials

Copy your App ID and App Secret from your Facebook App dashboard and set these environment variables:

NEXTAUTH_URL=instabook.yggbranch.dev
NEXTAUTH_SECRET=your-nextauth-secret
FACEBOOK_CLIENT_ID=your-facebook-app-id
FACEBOOK_CLIENT_SECRET=your-facebook-app-secret
INSTAGRAM_CLIENT_ID=your-instagram-app-id
INSTAGRAM_CLIENT_SECRET=your-instagram-app-secret
Step 5: Test Your Setup
Verify that everything is working correctly
  1. Start your development server
  2. Navigate to the application homepage
  3. Try signing in with Facebook
  4. Try signing in with Instagram (if configured)
  5. Check that you can view and download your media