Я пытаюсь получить встроенный код ссылки на YouTube с помощью ajax, но он всегда возвращает ошибку. Я использую ajax с Jquery.
$.ajax({
method: 'GET',
dataType :'json',
url:'http://www.youtube.com/oembed?url=http://www.youtube.com/watch?v=wbp-3BJWsU8&format=json',
success:function(data){
alert(data);
},
error: function(error) {
alert(error);
}
});