// Social integration · 8 steps · ~12 min

Facebook Setup

Get a never-expiring Page Access Token and Page ID so ArtDrop can post to your Facebook Page. Plan on 10 to 15 minutes. The long-lived token trick at the end is the whole reason you only do this once.

// You will end up with
  • social_facebook_token, a non-expiring Page Access Token
  • social_facebook_page_id, the numeric Page ID (like 104829348271039)
// Before you start, confirm all three
  • You have a Facebook Page (not just a personal profile).
  • You have Full control role on that Page. Open the Page, Settings, Page setup, Page access, make sure you're listed under People with Facebook access with Full control ON.
  • Your personal Facebook account has 2-factor auth enabled (required for Business-type apps).
  1. 1
    Meta for Developers

    Create a Meta developer app

    1. Go to developers.facebook.com, log in.
    2. Top right, My Apps, then Create app.
    3. Use case: pick Other, then Next. ("Other" exposes the widest product menu, including Pages permissions.)
    4. App type: pick Business, then Next. Business type is required for pages_manage_posts.
    5. Fill in app name (something like ArtDrop Personal), contact email, optional Business Portfolio, Create app, and pass the security check.
  2. 2
    App settings

    Note your App ID and App Secret

    1. Left sidebar, App settings, Basic.
    2. Copy the App ID (visible at the top).
    3. Click Show next to App Secret, reveal it, copy it somewhere safe (not in a git repo).
    4. Add a Privacy Policy URL and an App Domain if prompted. These are required for anything past development mode.

    You'll use the App ID and Secret in Step 5 to mint a long-lived token. Keep them handy.

  3. 3
    Graph API Explorer

    Generate a short-lived User Token

    1. Open developers.facebook.com/tools/explorer.
    2. Top right: Meta App dropdown, select the app from Step 1.
    3. User or Page dropdown, select User Token.
    4. Click Add a Permission and check each of these three:
      • pages_show_list
      • pages_read_engagement
      • pages_manage_posts
    5. Click Generate Access Token. In the popup, log in, Continue as [you], pick which Pages the app can access, Continue.
    6. Copy the token that fills the token field. It's valid for about 1 hour, so do Steps 4 through 6 in the same sitting.
  4. 4
    List your Pages

    Call /me/accounts in the Explorer

    With the User Token selected, replace the Explorer's default query with:

    GET me/accounts

    Click Submit. You get back an array of Pages you admin. Each one has id, name, and access_token. Find the row for the Page you want ArtDrop to post to.

    The access_token on this row is technically a Page Access Token, but it inherits the short-lived expiry from your User Token. The next step makes it permanent.

  5. 5
    Long-lived exchange

    Trade the short User Token for a long one (60 days)

    Open a new tab and paste this URL, filling in your APP_ID, APP_SECRET, and the short User token from Step 3:

    https://graph.facebook.com/v23.0/oauth/access_token
        ?grant_type=fb_exchange_token
        &client_id={APP_ID}
        &client_secret={APP_SECRET}
        &fb_exchange_token={SHORT_USER_TOKEN}

    Response:

    { "access_token": "EAAG...long...", "token_type": "bearer", "expires_in": 5183944 }

    Copy the new access_token. That's your long-lived User Token.

  6. 6
    The never-expiring move

    Re-fetch /me/accounts with the long-lived token

    Back in the Graph API Explorer, paste the long-lived User Token into the token field and run GET me/accounts again.

    This time, the access_token that comes back for each Page is a non-expiring Page Access Token. That's the one ArtDrop wants.

    Copy two fields off the Page row:

    • id, your Page ID.
    • access_token, your Page Access Token.

    This is the whole trick. A Page token derived from a short-lived User token expires in an hour. A Page token derived from a long-lived User token never expires (as long as you stay admin and don't change your Facebook password).

  7. 7
    Optional backup

    Double-check the Page ID another way

    If you want to confirm the Page ID another way:

    • Go to your Page on Facebook, open the About tab.
    • Scroll to the bottom, open Page transparency. The Page ID is listed there.

    Or in Meta Business Suite: Settings, Page details.

  8. 8
    Paste and save

    Paste both values into ArtDrop

    Back in ArtDrop's Social page, Facebook section:

    • Page Access Token: the never-expiring token from Step 6.
    • Page ID: the numeric ID from Step 6 (or Step 7).

    Hit Save. ArtDrop tests the token by calling /{page-id}?fields=id,name and will flag any mismatch immediately.

// Common gotchas
  • Business Portfolio Pages: if the Page is claimed by a Business Portfolio, your personal account needs admin access on that Portfolio and on the Page. Otherwise /me/accounts returns an empty array. Fix it in Business Settings, Pages, Add People.
  • "(#200) Permissions error": one of the three scopes wasn't granted. In the Explorer, remove the app under Settings, Apps and Websites on your Facebook account, then re-authorize with all three scopes re-checked.
  • Classic Admin role isn't enough: old Pages had a Facebook.com Admin role that's been deprecated. You need Full control in the new Pages Experience. Fix in Meta Business Suite.
  • Token dies on password change. Expected. Redo Steps 3 through 6 and update ArtDrop.
  • App in Development mode: fine for single-user use. Only you (as app Admin) can generate tokens until you flip it to Live. Don't flip to Live unless you're going through App Review.
// Stuck?

Meta moves buttons regularly. If anything doesn't match what you're seeing, email support@getartdrop.com with a screenshot of what's blocking you. We'll sort it same business day.

Official reference: Pages API docs, Access Tokens guide.