This page tells you how to retrieve the current maximum length of a t.co URL generated by Twitter in real time, as part of a JSON string returned via a RESTful HTTP interface:
Twitter RESTful API Description
The relevant values shown for the sample request (YMMV) are:
"short_url_length_https": 23
"short_url_length": 22
These values will change (increase) monotonically over time, as Twitter runs out of combinations to represent the number of URLs submitted (and shortened) thus far.
According to this FAQ from Twitter:
https://dev.twitter.com/docs/tco-link-wrapper/faq
"The maximum length of t.co URLs will change over time. Issue a request daily to GET help/configuration and examine the fields short_url_length and short_url_length_https to determine the current maximum length of wrapped URLs. We do not expect these values to change often."
If your users are providing their own large links, Twitter should now shorten these correctly. At the time of your post, there might possibly have been some problem with that, but at the present time I think that this is working correctly.
However, you might want to provide more meaningful-looking shortened URLs, and Twitter supports this with something called Tweet Entities. I have not used these myself, but here is a link describing them:
Tweet Entities