Ios TwitterKit + Parse Can Not Log in Twitter User ( from Parse Session)



So I use parse to login and signup users via Twitter from my ios app. Twitter signup works as intended from Parse but when trying to log in the user into TwitterKit (so that I can post tweets ) the TWTRAuthSession == nil.

This is the solution I’m following: What may be the issue?

  let authToken = PFTwitterUtils.twitter()?.authToken
  let authTokenSecret = PFTwitterUtils.twitter()?.authTokenSecret

Twitter.sharedInstance().sessionStore.saveSessionWithAuthToken(authToken!, authTokenSecret: authTokenSecret!, completion: { (session, error) -> Void in

Session is always nil. I have checked and I have an authToken and authTokenSecret.


Have you called

Twitter.sharedInstance().start(withConsumerKey: key, consumerSecret: secret)

in your AppDelegate.swift?


wow such a simple oversight but that was the fix thanks!


How long does twitter “keep” the session before needing to revalidate?


User sessions don’t expire unless they are invalidated by the user.