开发者

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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜