Msencenb Msencenb - 4 months ago 22x
iOS Question

Manually clear facebook token in Facebook Login 4.4 for iOS

Using facebook login version 2.4, with the FacebookCoreSDK iOS 4.4. Seems like version 4 has removed all manual session management features. The app I'm working on has a logout feature in which I would like to manually clear out the facebook access token.

Previously in 3.x I could do it like this:

[FBSession.activeSession closeAndClearTokenInformation];

I can't find an equivalent in 4.x.... any ideas?


You can use FBSDKLoginManager logOut method.

This calls [FBSDKAccessToken setCurrentAccessToken:nil] and [FBSDKProfile setCurrentProfile:nil].



[[FBSDKLoginManager new] logOut];