Click here to Skip to main content
15,913,944 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to find whether user is logged out from facebook or not using c# facebook api?
Posted
Updated 4-Jul-11 1:34am
v3

Its not possible with the facebook C# API. As long as your application has the access token to the facebook and facebook responds to the requests with this access token, the user is logged into the facebook.

The alternative way is using javascript

JavaScript
<div id="fb-root">

<script type="text/javascript" language="javascript">

window.onload=function()

{

// initialize the library with your Facebook API key

FB.init({ apiKey: 'b65c1efa72f570xxxxxxxxxxxxxxxxx' });

// fetch the status 

// you must have the login status before you can logout

// and if you authenticated via oAuth (server side), this is necessary.

// if you logged in via the JavaScript SDK, you can simply call FB.logout()

// once the login status is fetched, call handleSessionResponse

FB.getLoginStatus(handleSessionResponse);

}

// handle a session response from any of the auth related calls

function handleSessionResponse(response) {

// if we dont have a session (which means the user has been logged out, redirect the user)

if (!response.session) {

window.location = "/mysite/Login.aspx";

return;

}

}

</script>
</div>


More info here http://facebooksdk.blogspot.com/2011/06/facebook-logout.html
 
Share this answer
 
hi,

use
MIDL
Session.Clear();
            Session.RemoveAll();
            Session.Abandon();
 
Share this answer
 
I think, You should delete your browser history.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900