Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8008607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:11:26+00:00 2026-06-04T18:11:26+00:00

What is the difference between the long and short access tokens? for example i

  • 0

What is the difference between the long and short access tokens?

for example i am trying to get mutual friends using the following:

https://graph.facebook.com/$uid1/mutualfriends/$uid2?access_token=$token

and getting the access toke using the following function:

function getAccessToken(){
    $url ='https://graph.facebook.com/oauth/access_token?client_id='.FB_APP_ID.'&client_secret='.FB_SECRET_ID.'&grant_type=client_credentials';
    $info = file_get_contents($url);
    $clean = clean_up_data($info);
    return($clean);

}

but this does not work as the token is not valid, although if i used the access token found in Graph API Explorer it works but this token changes to much.

So how would you go about getting the valid token to allow access to mutual friends?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:11:28+00:00Added an answer on June 4, 2026 at 6:11 pm

    The token you get by using the code in your question is an app token and it can not be used to get friends of the user.
    The app token does not expire unlike the user token.

    User token can be short or long lived, based on how you obtained them.
    The short lived expire within a few hours, but the longed lived tokens expire only after 60 days.

    Short lived tokens are produced for the logged in user with the javascript sdk and the client side authentication flow and can be extended to long lived tokens using this new endpoint.
    The server side flow also produces long lived tokens.

    Once the app gets a user access token it cam them query for data on the behalf of the logged in user.
    You can check that with the explorer tool by selecting the application on the top right and then clicking the “Get Access Token” button, after allowing the app and permissions you’ll see that the “Access Token” field has the access token and you can start making api requests.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I have a nullable long, for example, is there any difference between myNullableLong.HasValue
What is the formatting difference between: DateTime datetimenow = DateTime.Now.ToLocalTime(); and long ticks =
What is the difference between killing an application using the close button and ending
short version: how can I get rid of the multiple-versions-of-python nightmare ? long version:
What is the actual difference between a long and an int in C#? I
What is the difference between Nhibernate Session.Get and Session.CreateCriteria? My story is: In our
This might be long and I apologize up front, I can get wordy trying
I know the difference between long and int But What is the difference between
Possible Duplicate: What is the difference between an int and a long in C++?
Using c# vs2008 Regex I am trying to get a number from a very

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.