Ich bin ein wenig jQuery-Plugin für eine Wiedergabeliste youtube Start und ich habe Probleme die URL richtigyoutube api json url
Konstruktiondies ist mein Code:
var playlist = {
playlist: '**',
apiKey: '**',
container: $('#test'),
shuffle: false
}
function player() {
var url = 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId=$'+playlist.playlist+'&key=$'+playlist.apiKey+'&callback=?';
console.log(url);
$.getJSON(url, function(result){
$.each(result, function(){
$('#test').append();
});
});
}
und das ist, was die URL oben returns:
{"error":{"errors":[{"domain":"global","reason":"invalidParameter","message":"Invalid value for parameter callback: ","locationType":"parameter","location":"callback"}],"code":400,"message":"Invalid value for parameter callback: "}}
https://developers.google.com/youtube/v3/docs/playlistItems/list – Donal