I tried to call bit.ly API using this jQuery script:
$.get('http://api.bit.ly/shorten?login=bitlyapidemo&apiKey=R_0da49e0a9118ff35f52f629d2d71bf07&version=2.0.1&longUrl=www.wordpress.com', function(data) {
alert(data);
});
but firebug said “405 Method Not Allowed”. What’s wrong? Thanks a lot.
$.getdo not support cross-domain GET.You can use JSONP technique, and
$.getJSON.BTW,
http://should in thelongUrlparameter of bit.ly API call. But it’s not the main problem.