title: Login using Facebook Problem after logging out
body: <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>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.";
              }
          }
  }
  </code></pre>