开发者

Facebook connect session

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜