Open SonOfSunTzu opened 10 years ago
It's not that we need to shorten the urls ourselves, but we should just adjust the counting so that we assume the current length of t.co urls (23 characters, currently).
Alternatively, just recognize the error codes from Twitter's API for a too-long tweet. Since t.co shortening only happens upon status update, just ignore counting chars and simply try to update the status. If it works, you're done! Otherwise, tell the user "tweet too long" if that's the error cause.
Unless there's a need for an active char count in the status bar, it's easier just to avoid char counting all together.
If the user cut and pastes a URL into twirssi it counts towards the 140 character limit in full, whereas only the shortened version will be used in the actual tweet.
If possible the original URL should be shortened to a t.co URL, or other service, before the number of characters is counted against the 140 character limit.
Thank you.