Multiple Twitter session in TwitterKit


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?


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


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.


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


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)?


@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?




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.


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.