I'm trying to make an HTTP Get request using JQuery, but I get an empty string as a response, so I figure I'm doing something wrong. I used the documentation from http://api.jquery.com/jQuery.get/ as a guide.
My code looks like this
$.get("http://www.last.fm/api/auth/?api_key=xxxkeyxxx", function(data){
window.console.log(data);
});
Edit: My code now looks like this
$.getJSON("http://www.last.fm/api/auth/?api_key=c99ddddddd69ace&format=json&callback=?",
function(data){
window.console.log(data);
});
But I'm getting a syntax error [Break on this error] \n
And it's located in http://www.last.fm/api/auth/?api_key=c99ddddddd69ace&format=json&callback=?
Latest edit: It seems this is because last.fm is responding with html not JSON, any ideas would be appreciated