Proper Connect Logout method

Jun 1, 2010 at 5:33 AM

What is the proper method to logout of a Connect session? I have seen several questions already on how to log the user out of Facebook from the client app, but I don't need that, I just need the Connect session closed.

This is the code that I have tried so far:

Facebook.Session.ConnectSession facebookSession = new Facebook.Session.ConnectSession(ConfigurationManager.AppSettings["ApiKey"], ConfigurationManager.AppSettings["Secret"]);            
            if (facebookSession.IsConnected())
            {
                Facebook.Rest.Api api = new Facebook.Rest.Api(facebookSession);
                api.Application.Session.Logout();
                api.Connect.Session.Logout();
                api.Session.Logout();
                facebookSession.Logout();
                
            }

Even after this code is executed IsConnected() still returns true.

I'm using version 3.0 of the FDT and using Connect in an ASP.NET MVC 2 application.

Thanks,
Justin