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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T17:36:24+00:00 2026-05-24T17:36:24+00:00

I am working on facebook application. I am getting the offline access permission from

  • 0

I am working on facebook application. I am getting the offline access permission from my app user. Now I want that I can use the same tokens that generated one time when user uses first time my app and i will store this token in my db and whenever the user will login again on our site and want to publish some wall post through our app we will use the same token for publishing on wall.

Here is my code

protected void Page_Load(object sender, EventArgs e)
{
    var auth = new CanvasAuthorizer { Permissions = new[] { "user_about_me", "publish_stream", "video_upload", "share_item", "photo_upload", "offline_access" } };

    var fbWebContext = FacebookWebContext.Current;
    if (fbWebContext.IsAuthorized())
    {
        try
        {
            var fb = new FacebookWebClient(fbWebContext);
            var token = fb.AccessToken;  \\ Im Getting Token This Way When its Generated From User After Getting Extended Permission
            dynamic result = fb.Get("/me");
            long id = fbWebContext.UserId;
        }
        catch (Exception ex)
        {
            if ("(OAuthException) Error validating access token: The session is invalid because the user logged out or because auth.expireSession was invoked." == ex.Message)
            {
                fbWebContext.DeleteAuthCookie();
                Session.Clear();
            }
        }
    }
}

I get the access token using var token = fb.AccessToken but when I use it it says

Your Token is Expired at Unix Time xxxxxxxxxx.

Can anyone please tell me anyone if this is the access token after requesting the extended permission of offline access then why is it saying “Your Access token is Expired?”. Can anyone please help?

  • 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-24T17:36:24+00:00Added an answer on May 24, 2026 at 5:36 pm

    The main issue here is that even though you request the offline_access permission, you can’t be 100% sure the token will never exipre.

    There are a number of cases where the Access Token may expire – even with the offline_access – scenarios such as: user changes password, app secret changes etc. In these and other cases, your app must be able to detect the invalidated access token and pass the user through the auth flow to get a new, fresh token.

    You can test your access tokens, and get debug on them by using the access token and access token lint tools: https://developers.facebook.com/tools/access_token and https://developers.facebook.com/tools/access_token/lint

    To double check you’ve successfully got a valid token, copy and paste one you got via the API into the graph explorer tool. https://developers.facebook.com/tools/explorer/?method=GET&path=me

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

Sidebar

Related Questions

I'm working on developing a Facebook application that accesses the user's friends list. Since
I am working on an app that imports photos from facebook. It creates a
I am working on a site that uses Facebook Connect for user login/creation. I
On a Facebook application (working under appengine) I need to tell the user which
I am developing a facebook application. I am not sure about getting extended permission
I'm building a facebook iFrame application that uses facebook comments. When a user leaves
I'm working on a Facebook Application that generates wall posts. In testing these posts,
I want to start working on developing a facebook application but honestly have no
I am working on a Facebook app that will allows users to vote on
I have been working on facebook application and you know on facebook native javascript

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.