twitter-archive / twitter-kit-ios

Twitter Kit is a native SDK to include Twitter content inside mobile apps.
Apache License 2.0
688 stars 449 forks source link

open twitter login page in browser after authorization from twitter application. #113

Open ParmarAtul003 opened 5 years ago

ParmarAtul003 commented 5 years ago

I have integrated login with Twitter in my application. The issue is when I tap on twitter login button in my app it's open twitter application for authorization, then I press the "Connect" button on twitter app then it redirects to my app and then open twitter login screen again in browser, So how to stop this two authorization when twitter application exists in device. Please let me know.

I have used the following methods:

let logInButton = TWTRLogInButton(logInCompletion: { session, error in if let session = session { print("signed in as (session.userName)"); } else { let errorDescription = error?.localizedDescription ?? "unknown" print("error: (errorDescription)"); } }) logInButton.center = self.view.center self.view.addSubview(logInButton)

AND

TWTRTwitter.sharedInstance().logIn(with: self) { (session, error) in if (session != nil) { print("signed in as (session?.userName ?? "")"); } else { print("error: (error?.localizedDescription ?? "")"); } }

Both method has same issue, Some time it works fine, open twitter app then authorize and return successfully in my app, But most of the time return in myapp and then open again twitter login page in a browser.

I have used pod 'TwitterKit' v3.4.2.

jskidd3 commented 5 years ago

Same issue here. 😭

ghost commented 5 years ago

Same issue here.

s1lence2012 commented 5 years ago

Same issue here....so sad