Implementing Logout


#1

I’ve implemented LogIn for twitter, but I can’t see to implement LogOut. The twitter documentation provides this code:

let store = Twitter.sharedInstance().sessionStore

if let userID = store.session?.userID {
store.logOutUserID(userID)
}

However, my system gives this error:

"Ambiguous reference to member ‘session(forUserID:)’


#2

Hey @ryzhu75,

Try using the following and let me know how it goes:

 let store = Twitter.sharedInstance().sessionStore

if let userId = store.session()?.userID {
            store.logOutUserID(userId)
}

#3

Hey @bonnell that worked for me. Looks like the twitter documentation needs to be updated.

Thanks


#4

Yep, it’s a change we need to make, thanks for calling it out.