views:

234

answers:

2

Hello, i can't logout a user when it's connected through facebook connect. I'm using the facebook developer toolkit. Anyone know how to "disconnect" a user ?

+3  A: 

There are functions to logout a user:

FB.Connect.logout

and

FB.Connect.logoutAndRedirect

These calls log the user out of both your site and Facebook. The latter method also redirects the user once the logout dialog closes.

You might want to checkout this thread as well:

http://stackoverflow.com/questions/1386557/how-to-log-out-users-using-facebook-connect-in-php-and-zend

Kelsey
Thank you for your answer. But i'm using a server side control. Can i call it from server side code ? If yes, how ? Thank you for your patience !
stighy
@stighy You could always just write the javascript to the Page's startup javascript so it runs as soon as you server up the page.
Kelsey
A: 

I use the javascript function FB.Connect.logoutAndRedirect; The redirect sends them to somewhere we can kill the session on our side.

Nick