Adding TweaK to your Twitter application
Some Twitter programs allow you to setup a custom URL shortener. That is a great thing as this makes you less dependent on whether or not the developer of your Twitter application wants to implement your URL shortener. On the other hand its very nice for the developer, as he does not need to implement an unlimited number of URL shorteners.
Some Twitter applications have problems with implemening TweaK however. This is caused by the fact that TweaK responds with two links.
If you would shorten maurice.im using the TweaK API using the following URL:
http://api.dot.tk/tweak/shorten?long=http://maurice.im
You would get the following response:http://8zlnb.tkhttp://tk./8zlnb
First line is the TweaK domain address, second line is the TK short URL. Some Twitter applications will concat the two strings, resulting in an URL like:
http://8zlnb.tkhttp://tk./8zlnb
Thats an obvious fail :(
To cope with that I have created a little wrapper service that allows you to choose which line you want.
http://tweak-it.appspot.com/single?long=<long url>&line=<line nr>
<long url> is the url you wish to shorten.
<line nr> is the line number you wish to get as a result.
Shortening maurice.im would be like this:http://tweak-it.appspot.com/single?long=http://maurice.im&line=2
The result would be:http://tk./8zlnb
If you would omit the line parameter, it will default to the first line.
Happy TweaKing!



