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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:02:34+00:00 2026-05-22T22:02:34+00:00

I am using facebook sdk and facebook connect for integrating fb into my site

  • 0

I am using facebook sdk and facebook connect for integrating fb into my site using asp.net and c#. The user can login using the code successfully. The problem that I face is that whenever a user is logged in thru fb; if the user logs out from the facebook’s site and then tries to login through my site using fb connect, it gives error: The session is invalid because the user logged out.

I should again provide the facebook connect button to log in as it does initially but it gives error. The code used is shown below:

protected void Page_Load(object sender, EventArgs e)
{
        if (!Page.IsPostBack)
        {
            if (ConnectAuthentication.isConnected())
            {
                Facebook.Session.ConnectSession _connectSession = new Facebook.Session.ConnectSession(ConfigurationManager.AppSettings["ApiKey"], ConfigurationManager.AppSettings["AppSecret"]);
                if (!_connectSession.IsConnected())
                {
                    lblStatus.Text = "Please sign-in with Facebook.";
                }
                else
                {
                    Facebook.Rest.Api api = new Facebook.Rest.Api(_connectSession);

                    Facebook.Schema.user user = api.Users.GetInfo();
                    string fullName = user.first_name + " " + user.last_name;
                    lblStatus.Text = fullName;
                }
            }
            else
            {
                lblStatus.Text = "Please sign-in with Facebook.";
            }
        }
}
  • 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-22T22:02:35+00:00Added an answer on May 22, 2026 at 10:02 pm

    When a user logs out the session is invalidated. You need to have the user log in again. If you don’t want to do that then please request the “offline_access” extended permission during authentication. This way the user does not have to be logged-in.

    FYI, you will have to move to OAuth before September 1st 2011. Facebook will ONLY support OAuth after that.

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

Sidebar

Related Questions

I am using the following android fb connect library. http://github.com/facebook/facebook-android-sdk/ problem is after successful
I'm using the PHP SDK for facebook connect. Now, I can log people in
I'm using Facebook's Javascript SDK to allow login/logout, and my problem is that when
I'm using the facebook ios Sdk to connect my application with facebook. The login
I'm working on a site that is using Facebook Connect and recently made some
I'm using the Facebook Connect for iPhone SDK at http://github.com/facebook/facebook-iphone-sdk/ and am trying to
I have a website which users can sign up to using Facebook Connect (with
I'm looking at the sample code for Facebook Connect ( http://github.com/facebook/facebook-ios-sdk ) and noticed
originally i was using a .net sdk for facebook found here: http://facebooktoolkit.codeplex.com/ but now,
I have integrated the Facebook SDK in my app using the official facebook connect

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.