I am using facebook connect on my site. I use some code to retrive data from facebook like Profile Information, 开发者_JAVA技巧Friends list etc.
My session will not expire until I close the browser manualy.
What code should I use on my logout page so that the session will expire automatically?
Assuming you already have the FB Javascript library included (like this):
<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js">
</script>
you can use FB.logout()
:
<a href="#" onclick="FB.logout();return false;">Logout</a>
Note that this will log out the user from FB Connect and Facebook.
精彩评论