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 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.