4
我使用jQuery到JSON數據發送到的Grooveshark API來獲取搜索結果,但這是結果我得到 -的Grooveshark公共API - 未找到方法
{"errors":[{"code":2,"message":"Method not found."}]}
這是一段代碼觸發grooveshark API。我無法弄清楚這個問題,任何幫助都會很棒。
$.ajax({
type: "POST",
url: 'http://api.grooveshark.com/ws3.php?sig=secret_code',
data: {
"method":"getSongSearchResults",
"header":{"wsKey":"secret_key"},"parameters":{"query":"megadeth hangar 18","country":"1","limit":"2","offset":""}
},
dataType: 'jsonp',
crossDomain: true,
async: false,
success: function() {
alert("success!");
}
});
在控制檯中是否有任何錯誤?嘗試ading錯誤塊爲ajax。 – 2013-03-04 09:13:48
「將資源解釋爲腳本,但使用MIME類型text/json傳輸:」http://api.grooveshark.com/ws3.php?sig=secret_code&callback=jQuery191029284...untry%5D=1¶meters%5Blimit%5D=2¶meters%5Boffset% 5D =&_ = 1362385999021「。jquery-1.9.1.js:8336」 AND 「Uncaught SyntaxError:Unexpected token:」 – siddharthwm 2013-03-04 09:26:24