Twitter iPhone app opens safari in middle of OAuth from webview



Steps to reproduce:

  1. Open Twitter app on iPhone
  2. Open a link related to my website from the app
  3. On the web view opened by the app, try to “sign in using twitter”
  4. After getting request token and request token secret, I store them in the session as I need to sign all requests using these things going forward.
  5. But when I redirect to as mentioned in it suddenly opens safari browser
  6. This creates a new session and I lose the request token and request token secret that I stored in step 4.

This causes the sign in to fail in my app. Is there a solution to this problem? This same thing works perfectly fine on Android but fails on iOS.

PS: I am not sure how can this post be considered spam or promotional.


Even I am facing similar issue, log in fails when the context switches from app webUI to browser.


We have a similar issue.


We have similar issue. I created a post on stack overflow hoping there is a solution to stop auto redirecting to the native Twitter app.


Has anyone received word on how to address this? I’ve seen a lot of post about the same issue, but yet to have found a solution. Anyone?


Clicking the go button on the keyboard instead of “Authorize App” in the web view is a workaround to the issue. -

I hope Twitter fixes this in the future.


WE are also having the same problem. Would be nice if twitter could take the time to offer some insight.