Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swift Facebook SDK Logout

I have integrated the facebook sdk into my ios app but want to create a custom logout button as i think the uiview logout button the sdk provides does not fit my color scheme. does anyone know how I can run a method to do a facebook logout?

I have tried the following code but it doesn't work

var theFBSession = FBSession.activeSession()
var check = FBSession.closeAndClearTokenInformation(theFBSession)
like image 257
Marc-jean Baptiste Avatar asked Nov 12 '14 02:11

Marc-jean Baptiste


1 Answers

Facebook SDK 4.X with Swift

let loginManager = FBSDKLoginManager()
loginManager.logOut()
like image 72
chemic Avatar answered Oct 23 '22 23:10

chemic