سؤال

I've been using the Facebook sdk for iOS. It's working great and I could login using this sdk. But the problem comes in when I want to logout from the system.

If I click the logout and come to home screen, iOS login feature is called again and based on previous session it logged the users back in. (I maintain my own session for the app, so using fblogin to just let users do easy registration)

I just wanna know how to manually kill the session completely so it won't login the user again once I come to login screen.

I went through their logout section but seems it's more complicated.

Can someone point me out to some resources on this.

هل كانت مفيدة؟

المحلول

Did you try this?

[FBSession.activeSession closeAndClearTokenInformation];

نصائح أخرى

Close the current session and clear all token info as below

[FBSession.activeSession close];
[FBSession.activeSession closeAndClearTokenInformation];

As per documentation here id the detail of the methods below.

[FBSession.activeSession close];---- Closes the local in-memory session object, but does not clear the persisted token cache.
[FBSession.activeSession closeAndClearTokenInformation];-----Closes the local in-memory session object, and clear the persisted token cache.
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top