0
我試圖通過$.ajax
獲得StumbleUpon對url的看法。使用AJAX無法獲得StumbleUpon對url的看法,因爲它的API返回文本/純
我使用這個API:
http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://example.com/
全碼:
$.ajax({
type: "GET",
url: "http://www.stumbleupon.com/services/1.01/badge.getinfo?url=http://example.com/",
dataType: "jsonp",
success: function(result) {
console.log(result.result.views);
}
});
問題:
它返回控制檯 「Resource interpreted as Script but transferred with MIME type text/plain
」 代替觀點數+其他一些事情不應該有
完全錯誤的圖像:http://i.imgur.com/neIvsMf.png
我能使用只有JavaScript這些意見算不算?
它看起來並不像API支持JSONP或爲此事CORS – Musa 2015-01-09 23:05:29