Unauthorized/ Invalid token



Did compose twitter the same way as shown in Tutorial, works fine first time to authorize, and post tweets. But if I remove access on my account, next time when I’m in the app and tap share via Twitter, the same Composer shows up, but if I tap Send, instead of popping up a log in web view as first time, it’s just failing the post with error code 215.

composer.setText("just setting up my Twitter Kit")
composer.setImage(UIImage(named: "twitterkit"))

// Called from a UIViewController
composer.show(from: self.navigationController!) { (result in
    if (result == .done) {
        print("Successfully composed Tweet")
    } else {
        print("Cancelled composing")

"Request failed: unauthorized (401)" UserInfo={NSLocalizedFailureReason=Twitter API error : Invalid or expired token. (code 89), TWTRNetworkingStatusCode=401, NSErrorFailingURLKey=https://api.twitter.com/1.1/statuses/update.json, NSLocalizedDescription=Request failed: unauthorized

Shouldn't TwitterKit handles this? In tutorial it says:
```TWTRComposer relies on the existence of a local Twitter account in current session. If no account exists, attempting to show the composer will prompt the user to log in to Twitter app or on a web view.```

Thanks in advance for helping.