DailyMotion API not returning JSON object?
I'm trying to access the DailyMotion API. Try running this in your JavaScript console:
$.getJSON('https://api.dailymotion.com/video/xirgl9?fields=id', function开发者_如何学JAVA(data) {
console.log(data);
});
Anyone know why this doesn't work and returns code 200 but no data? Because if you manually type in the URL
https://api.dailymotion.com/video/xirgl9?fields=id
A proper JSON object does indeed return.
this should be jsonp. add &callback=?
to the end of your url and you'll get the proper objects back.
精彩评论