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 8225053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:17:01+00:00 2026-06-07T15:17:01+00:00

When do I need to use the access token stored in my database? This

  • 0

When do I need to use the access token stored in my database?

  • This access token is a user access token.
  • It seems like the PHP SDK does a pretty good job of getting an access token on it’s own. Though this looks like it’s handled through a Session.
    — What if the Session gets wiped somehow?
    — Should I provided a link?
    — Or should/can I automate this somehow?
  • I am new to Facebook’s Open Graph API.
  • I am using the Facebook PHP SDK.

I also got a little confused with the docs on Facebook and implementing the PHP SDK. After spending a decent amount of time mixing and adapting the two I realized that almost all examples in the docs are a part of the PHP SDK. Hence my above question.

  • 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-07T15:17:02+00:00Added an answer on June 7, 2026 at 3:17 pm

    There is no real reason you need to store a users access_token in your database. Chances are the next time you come to use it – it’ll be invalid already. They only last for an hour or two in my experience. Officially, the documentation states :

    When you obtain an access token from Facebook, it will be valid
    immediately and usable in requests to the API for some time period
    defined by Facebook. After that period has elapsed, the access token
    is considered to have expired and the user will need to be
    authenticated again in order for your app to obtain a fresh access
    token. The duration for which a given access token is valid depends on
    how it was generated.

    There is no concrete time period of how long a (normal) token can be valid so there would be no reason to store it. If you wanted to have an exhaustive log of all transactions with the API you could store the token as a reference – but that is overkill IMO…

    The only reason to store your tokens at all would be if you are dealing with extended access_tokens. If you are looking into that field, I can recommend this post –
    ” http://facebook.stackoverflow.com/questions/8982025/how-to-extend-access-token-validity-since-offline-access-deprecation “. It seems to be the most comprehensive post dealing with extending the validity of an access_token. You’ll want to do this if you want to make calls to the Graph API on behalf of the user when s/he is not necessarily connected to your application (or logged into Facebook at all for that matter – don’t know if I like that at all…)

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

Sidebar

Related Questions

best solution for use access in project for database with security i need to
I need use this method with three distinct classes: Orders, Customers, Suppliers public void
I need use this code: <%= button_tag :class => btn btn-primary do %> <%=
So, I need use this event so I can navigate trought blog posts. I
This is the access token associated with my Facebook application -- the thing that
How can i get access token for searching venues in foursquare. From this gem,
i need to read the content of a web page using php with this
My application gets approved and a user gets an access token and extended permissions
How can I get the Access Token for the user that created the process
I'm using the HTML 5 local storage API to store a user's access token.

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.