Android Facebook SDK for Android Logging out of Facebook

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Example

Facebook SDK 4.0 onwards, this is how we logout:

com.facebook.login.LoginManager.getInstance().logOut();

For versions before 4.0, the logging out is gone by explicitly clearing the access token:

Session session = Session.getActiveSession();
session.closeAndClearTokenInformation();


Got any Android Question?