Link cutoff when requesting a status


#1

Hello,

When I make a call to some statuses, for example: https://api.twitter.com/1.1/statuses/show/568088506658099200.json the response comes back with a cutoff url like “http://t.c” at the very end. I have regex set up to read the string and convert a url into a link, so this becomes a broken link going to “http://t.c”.

What I’m wondering is why is this set up this way? Either just exclude it completely if it’s past a character limit, or just include it in it’s entirety? Has anyone found a way to exclude this from the actual status being displayed?

Thanks!


#2

Hey, this is for compatibility with old clients. You should not use a regex but instead the right indexes indicated in the Tweet’s entities. Please note that the retweeted_status contains the full status and should be used instead if your client supports native RTs.


#3

As you mentioned the solution was to check if the status was a retweet, and display the values in retweeted_status instead which gave me the full correct text.

Thanks for the response, ePirat!