I´m working Youtube API now, and sometime data is null , i dont know why…
function get_youtube_info(youtubeID) {
$.getJSON("http://gdata.youtube.com/feeds/api/videos/"+youtubeID+"?v=2&prettyprint=true&alt=jsonc", function(json){
if (json.data.accessControl.embed == "allowed") {
//do something...
}
});
}
May i use $.ajax , $.get , $.post or what ?
sounds like youtube is expecting you to cache your response, hence the
304try