我正在尝试加载soundcloud like(曾经是收藏夹),但我没有从ajax查询中获得任何结果。
这是我要加载的网址:http://soundcloud.com/gazebo-fm/likes
function soundCloudTrackData(linkUrl) {
var url = soundCloudApiUrl(linkUrl, soundcloudApiKey);
$.ajax({
url: url,
dataType: 'jsonp',
cache: false
}).done(function( data ) {
console.log(data);
}).fail(function(jqXHR, textStatus, errorThrown) {
alert('Soundcloud process error: ' + jqXHR.responseText);
});
}
function soundCloudApiUrl(url, soundcloudApiKey) {
var useSandBox = false;
var domain = useSandBox ? 'sandbox-soundcloud.com' : 'soundcloud.com'
return (/api\./.test(url) ? url + '?' : 'http://api.' + domain +'/resolve?url=' + url + '&') + 'format=json&consumer_key=' + apiKey +'&callback=?';
};
答案 0 :(得分:0)
将网址更改为http://soundcloud.com/gazebo-fm/favorites
/likes
用于新的soundcloud的api,尚未记录。