开发者

Facebook connect session

开发者 https://www.devze.com 2023-01-13 10:46 出处:网络
I am using facebook connect on my site. I use some code to retrive data from facebook like Profile Information, 开发者_JAVA技巧Friends list etc.

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

精彩评论

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