Swift Facebook SDK Logout

I have included facebook sdk in my ios application, but I want to create a custom logout button, since I think that the uiview exit button provided by sdk does not match my color scheme. Does anyone know how I can run the method to exit to facebook?

I tried the following code but it does not work

var theFBSession = FBSession.activeSession() var check = FBSession.closeAndClearTokenInformation(theFBSession) 
+5
source share
4 answers

Facebook SDK 4.X with fast

 let loginManager = FBSDKLoginManager() loginManager.logOut() 
+11
source

For quick 3.0 add below exit code

 let loginManager = LoginManager() loginManager.logOut() 
+3
source

It may be late, but try the following:

 FBSession.activeSession().closeAndClearTokenInformation() 

I hope this helps

+1
source

Sign out of Facebook

 let fbLoginManager = FBSDKLoginManager() fbLoginManager.logOut() 
0
source

Source: https://habr.com/ru/post/1206683/


All Articles