How to programmatically log out from Facebook SDK 3.0 without using Facebook login/logout button?

Update for latest SDK:

Now @zeuter’s answer is correct for Facebook SDK v4.7+:

LoginManager.getInstance().logOut();

Original answer:

Please do not use SessionTracker. It is an internal (package private) class, and is not meant to be consumed as part of the public API. As such, its API may change at any time without any backwards compatibility guarantees. You should be able to get rid of all instances of SessionTracker in your code, and just use the active session instead.

To answer your question, if you don’t want to keep any session data, simply call closeAndClearTokenInformation when your app closes.

Leave a Comment