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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:29:50+00:00 2026-05-26T02:29:50+00:00

Currently i’m developing a side project with heavy Facebook integration. The user signs in

  • 0

Currently i’m developing a side project with heavy Facebook integration. The user signs in via omniauth and then i use their access_token in conjunction with fb_graph to get their data. But after approx. 30 minutes i get this error:

OAuthException :: Error validating access token: Session has expired at unix time 1317304800. The current unix time is 1317306973.

How can i possible catch this error and fix it? It happens randomly so i think a before_filter on application_controller level is the best option. Then i want to catch the url where they are on or are being redirected to so that i can redirect the user to “/auth/facebook” and let them return to the url they wanted to go.

Another option is an observer? Is this possible to observe the user and if this error occurs catch it and remember the current_url or the redirect url and then redirect the user to /auth/facebook for a new access_token..

What do you think is the best option? Or do you have a better solution?

Thanks!

  • 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-05-26T02:29:50+00:00Added an answer on May 26, 2026 at 2:29 am

    The access token expires in after “X” time. You could ask for offline_access permission and then save it in your database

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

Sidebar

Related Questions

Currently if i have dependency project opened, then maven use it instead of specified
Currently I'm developing a registration form for new user in Android (native app.) and
Currently we have a project with a standard subversion repository layout of: ./trunk ./branches
Currently I know of only two ways to cache data (I use PHP but
Currently, I am developing a product that does fairly intensive calculations using MS SQL
Currently am developing a program that solves (if possible) any given labyrinth of dimensions
Currently in my comp., there are some changes going on regarding project documentation. There
Currently I'm doing a project whose specifications are unclear - well who doesn't. I
Currently I use [Authorize(Roles = .....)] to secure my controller actions on my ASP.NET
Currently we use log4net of version 1.2.10.0 and we should start using some 3rd

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.