开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜