I have a website where everytime one of our customers reviews a new product it gets tweeted onto the company twitter account automatically.
for the actual tweeting, i am using the twitter api's directly, without any wrapper classes and libraries. its all working fine, except, when the post gets too lengthy, it doesnt get tweeted because twitter has just 140 character limit (my baby nephew can handle more characters than that!)
So what is the best way to shorten the url like bit.ly or tinyurl? do they provide some api's .net users? or does twitter has some url shortening service?
I could have just done something about it, but what I really want is an expert opinion, what is the best thing to do in a case like this.
ps: there are several closely related questions in here, but nothing was close enough for my situation.
The TinyURL service has an incredibly simple API for generating short links.
Just make an HTTP request putting the given website in the query strnig as such:
http://tinyurl.com/api-create.php?url=https://stackoverflow.com/
and the output is your shortened URL! The HTTP response is simply a text/plain document containing the strnig. In this case, http://tinyurl.com/5cttyz
.
Example
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With