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

  • Home
  • SEARCH
  • 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 8645547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:34:45+00:00 2026-06-12T12:34:45+00:00

I am using facepy facebook api to fetch messages from my facebook account. I

  • 0

I am using facepy facebook api to fetch messages from my facebook account. I have got myself long live access token with validity of 60days using the API. Now, in my program before querying for message I want to check wether my token has expired or not and if expired fetch a new one.

I am using get_extended_access_token which also returns a datetime instance describing when token expires. Now I think it is not a effecient way to use get_extended_access_token because everytime I am going to query for new message it will also fetch the access token(I know it is same as before) but I think this is a overhead.

So, I googled and found that we can also use

https://graph.facebook.com/debug_token?input_token=INPUT_TOKEN&access_token=ACCESS_TOKEN

to debug the token

So I supplied my long live access token instead of INPUT_TOKEN and ACCESS_TOKEN and it gave me a json response:

{
   "data": {
      "app_id": XXXXX,
      "is_valid": true,
      "application": "YYYYY",
      "user_id": ZZZZZZ,
      "issued_at": 1349261684,
      "expires_at": 1354445684,
      "scopes": [
         "read_mailbox"
      ]
   }
}

Now if you look at expires_at field it is showing 1354445684 seconds and when I tried to convert it into days/months it gave me 15676 days and when I checked the same token in graph explorer using the debug option it showed

expires_at: 1354445684(about 2 months)

Now, what I don’t understand is how 1354445684 is equivalent to 2 months and how to achieve this in python.

Also comment on which is the better approach to check wether token has expired or not API or using the facebook url?

  • 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-12T12:34:47+00:00Added an answer on June 12, 2026 at 12:34 pm

    Now if you look at expires_at field it is showing 1354445684 seconds and when I tried to convert it into days/months it gave me 15676 days

    Then you’ve done (or understood) something wrong.

    expires_at 1354445684 is a Unix Timestamp, and equals Sun, 02 Dec 2012 10:54:44 +0000 translated into a human-readable date.

    And that is pretty much two month from the issued_at timestamp 1349261684, a.k.a. Wed, 03 Oct 2012 10:54:44 +0000

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

Sidebar

Related Questions

I am using facepy facebook graph API to access my mailbox/messages and I followed
Using Java,I have to fetch multiple sets of values from an XML file to
Using Core Data, I have a fetch request to fetch the minimum of a
Using the new mvc4 now gives us access to use facebook oauth otb. I
I am using fandjango and facepy for building facebook application. So, this is how
Using SLComposeViewController , I notice curious behavior when posting to Facebook if both the
Using the django-haystack and solr as a search engine, I have successfully implemented a
Using mercurial, I've run into an odd problem where a line from one committer
Using MVC2 I have an AJAX form which is posting to a bound model.
Using php/html, I want to retrieve email addresses (plus other information) from MySQL and

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.