How to un-shorten links with jQuery? [duplicate]

I've got a twitter plugin that prints links. How can I 'un-short' them with jQuery? Is there a library I could use?

I did some searches but I can't find anything. Maybe I'm searching on the wrong thing...



I made a fiddle here:

It makes a request to the api at LongURL ( to get the expanded url.

var tests = [
    '' //nothing should happen

var expander = {
    expand: function (url, callback) {
            dataType: 'jsonp',
            url: '',
            data: {
                url: url,
                format: 'json'
            success: function(response) {

for(i in tests) {

    expander.expand( tests[i], function(response) {



Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.