Multiple Twitter session in TwitterKit


#1

In new TwitterKit (iOS) API, we’ve got methods to manage multiple user sessions. However, it seems there are no way we can actually create multiple user sessions. i.e. login button or logInWithCompletion will only works for first user session.

Can we have multiple user session support?


#2

@siuying Check out the documentation here for managing user sessions.


#3

Thanks, I read that page.

The issue is that I can only login one account with logInWithCompletion. Second time I call this method, it just returned with first login. So I will never have second session.

Unless, I managed to do a oauth and get a session myself, then use [TWTRSessionStore saveSession:completion:]. to save the session, which defeat the purpose of using Fabric.


#4

@siuying Are you logging the users out and removing the current session before attempting a second login?


#5

No. I want to have multiple user sessions at the same time. If I can only have one session, whats the point to have methods like store.existingUserSessions(), store.sessionForUserID(id)?


#6

@siuying Just to be sure I’m following, you want to have multiple logins on your app so that users can decide which account they want to use when composing the tweet?


#7

Yep!


#8

To handle this, you would need to have the users have the second account directly in iOS Settings -> Twitter. We’re considering changes to this, but currently this is how it needs to be handled if you want that option.


#9

Thanks, this solve the mystery for me.

That would be very nice if we can make more session even they were not in iOS settings.


#10