title: Facebook Logout button in asp.net web application
body: <p>I am trying to create an asp.net web application, in which when user logins with Facebook through my application, the friends of that user will be displayed in the application.</p>
  
  <p>Now i want to create a Facebook Logout button so that user can log out also. I tried one code</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;asp:ImageButton ID="imgLogout" runat="server" OnClientClick="FB_Logout()"     ImageUrl="~/logout.jpg"/&gt;
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function FB_Logout() {
  
  alert('Are you sure?')
  FB.Connect.logoutAndRedirect("http://localhost:2708/List.aspx");
  
  }
  
  &lt;/script&gt;
  </code></pre>
  
  <p>it was working fine. But now user can not logout. Clicking on Facebook Login Button directly opens the already logged in user.</p>