I'm trying to build a jQuery function that will allow me to produce a TinyURL from some other link for micro blogging reasons (yes, twitter)... I found this tutorial from James Padolsey, but am not getting a response back from the call.
http://james.padolsey.com/javascript/create-a-tinyurl-with-jsonp/
function requestShortURL(longURL, success) {
var API = 'http://reque.st/create.api.php?json&url=',
URL = API + encodeURIComponent(longURL) + '&callback=?';
console.log('tweet apit url: ' + URL);
$.getJSON(URL, function(data){
success && success(data.url);
});
}
requestShortURL('http://www.mycompany.com', function(shortened){
alert('new url: ' + shortened);
});