Hi,
This is my pod configuration:
pod ‘TwitterKit’, ‘3.3.0’
pod ‘TwitterCore’, ‘3.1.0’
My code to detect there is a user logged to compose Tweets:
if TWTRTwitter.sharedInstance().sessionStore.hasLoggedInUsers() {
self.presentTwitterComposeView()
} else {
TwitterNetworkManager.instance.logIn({
print("logged")
self.presentTwitterComposeView()
}, failure: { (error) in
print("not logged: \(error.debugDescription)")
let alert = UIAlertController(title: "Message_Title_Not_Twitter_Account".localized(), message: "Message_Text_Not_Twitter_Account".localized(), preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Message_ok".localized(), style: UIAlertActionStyle.default, handler: nil))
self.present(alert, animated: false, completion: nil)
})
}
The code works perfect but once the user revoke the access to the app, the compose appear and when user send a pop up appear:
Tweet failed to send
Is there any way to detect the user has revoked the app to launch the login process?
Thank you