Twitter json warning
everyone. When I get tweets count like this:
$.getJSON('http://urls.api.twitter.com/1/urls/count.json?url='+ url +'&callback=?',fun开发者_StackOverflowction(data){
return data.count;
});
Google Chrome shows this warning:
Resource interpreted as Script but transferred with MIME type application/json.
I tried a lot of options, but can find right one. How can I remove this warning?
You can't. It's a JSONP request, so it has to be interpreted as a script. However, twitter is serving it up as JSON. Hence the MIME type mismatch.
精彩评论