title: How to get Facebook _Account_ (i.e. Page) access tokens that never expire?
body: <p>This topic is extremely hard to Google for because of some unfortunate terminology choices, so here's a quick clarification before I ask my question:</p>
  
  <p>Facebook accounts (i.e. a person's top-level, personal account) can have sub accounts (companies, brands, celebrities, etc) which Facebook unfortunately calls "accounts". The endpoint for interacting with these "accounts" is at [user id]/accounts. For the purposes of this question, I'll refer to these as "sub-accounts"</p>
  
  <p>FACEBOOK STATEMENTS &amp; ACTUAL OBSERVATIONS:</p>
  
  <p>Facebook, in this post (<a href="https://developers.facebook.com/roadmap/offline-access-removal/" rel="nofollow">https://developers.facebook.com/roadmap/offline-access-removal/</a>), says a few things:</p>
  
  <ol>
  <li><p>That there are two types of access_tokens: "the long-lived user access_token will be valid for 60 days while the short-lived user access_tokens are currently valid from 1 to 2 hours" <strong>ACTUAL OBSERVATION:</strong> Seems true. My app only does server-side, so I can't confirm the short type.</p></li>
  <li><p>"if the access_token is generated from a server-side OAuth call, the resulting access_token will have the longer expiration time by default" <strong>ACTUAL OBSERVATION:</strong> My server-side app does produce longer, 60-day expirations.</p></li>
  <li><p>"When requesting an extended access_token from... <a href="https://graph.facebook.com/oauth/access_token?client_id=APP_ID&amp;client_secret=APP_SECRET&amp;grant_type=fb_exchange_token&amp;fb_exchange_token=EXISTING_ACCESS_TOKEN" rel="nofollow">https://graph.facebook.com/oauth/access_token?client_id=APP_ID&amp;client_secret=APP_SECRET&amp;grant_type=fb_exchange_token&amp;fb_exchange_token=EXISTING_ACCESS_TOKEN</a> ...if you pass an access_token that had a long-lived expiration time, the endpoint will simply pass that same access_token back to you without altering or extending the expiration time" <strong>ACTUAL OBSERVATION:</strong> This is not true in my case. When I pass the original 60-day token, I get a different token back. Furthermore, the new, different token does not work at all. The FB endpoint returns an authentication failure when attempting to use it.</p></li>
  <li><p>"When a user grants an app the manage_pages permission, the app is able to obtain page access tokens for pages that the user administers by querying [User ID]/accounts...  By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do not expire." <strong>ACTUAL OBSERVATION:</strong> The <em>page</em> access tokens my app retrieves (using the original, root, 60-day token) ARE expiring after 60 days when they should be infinite. Per #3, I can't try this with the new, different (supposedly extended) access token because it is invalid.</p></li>
  </ol>
  
  <p>QUESTIONS: </p>
  
  <ol>
  <li><p>My server-side request produces tokens that are valid for 60 days. Requesting an extended token should echo the same token back, but doesn't. Why not?</p></li>
  <li><p>The new, different token I'm getting back doesn't work at all. Why not?</p></li>
  <li><p>If the original access tokens my app gets are the long, 60-day type, then the PAGE access tokens I retrieve with them should be non-expiring. But they do expire. Why?</p></li>
  </ol>
  
  <p>Any help would be much appreciated!!!</p>
  
  <hr>
  
  <p>Note to moderators: Before disabling this question for not being "code-oriented" enough, Facebook points all questions to Stack Exchange. <a href="https://developers.facebook.com/support/" rel="nofollow">https://developers.facebook.com/support/</a> If I can't ask this question here, then where would I ask it? </p>
  
  <hr>
  
  <p>UPDATE: The officially-supported way of checking a token for validity is as 
  follows:</p>
  
  <p><code>graph.facebook.com/debug_token?
                   input_token={token-to-inspect}
                   &amp;access_token={app-token-or-admin-token}</code></p>
  
  <p>When I use this method, the app tokens I've got for my users show an expiration of "0" as they should. So I guess they are infinite. It's impossible for me to know for sure until 60 days have passed whether FB is telling the truth with "expires":0;</p>