私は、ユーチューブの再生リストのために少しjQueryプラグインを起動していると私はURLを構築する問題を抱えています適切にユーチューブAPIのJSONのURL
これは私のコードです:
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();
});
});
}
、これは、上記のどのようなURLです戻り値:
{"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