I am the latest version of TwitterKit (2.5) and when I attempt to share a Tweet with an image and URL, the TWTRComposer is counting them character count. Twitter is supposed to no longer count media against the character count, and in fact I am able to post the exact same tweet from the web that I cannot post in-app (app says it is too long).
In my current use case, my actual tweet text is 100 characters. With an image and URL, TWTRComposer is showing that I am 8 characters over the limit. Yet, I can post this exact same Tweet with the exact same content from Chrome with 16 characters to spare.
Is this a known bug?
Code snippet:
func didTapShareToTwitter() {
// Configure composer
let composer = TWTRComposer()
composer.setText(composerText)
composer.setURL(shareURL)
if shareImageURL != nil {
if let imageData = NSData(contentsOfURL: shareImageURL!) {
composer.setImage(UIImage(data: imageData))
}
}
// Present composer
composer.showFromViewController(self) { result in
if (result == TWTRComposerResult.Cancelled) {
log("Tweet composition cancelled.")
}
else {
log("Sending tweet...")
}
}
}