Twitter now automatically shortens all links by itself, using t.co
. Don't do it by yourself.
If you are not using the opt-in features, only links shorter in length than a t.co URL will be wrapped by t.co. All links t.co-length or longer should be considered as t.co's maximum length. For example, if help/configuration reports 20 characters as the maximum length, and a user posts a link that is 125 characters long, it should be considered as 20 characters long instead. If they post a link that is 18 characters long, it's still only 18 characters long.
At the moment short_url_length
is equal 22
(https://api.twitter.com/1/help/configuration.json)