Reputation: 99
I want a channel list for playlist from Music Channel of youtube here, however I am getting error on the console, This is my code:
$(document).ready(function() {
$.get (
"https://www.googleapis.com/youtube/v3/channels", {
part: "contentDetails"
forUsername: "Music", //<-- the error is here? Uncaught SyntaxError: Unexpected identifier
key: "AIzaSyCKhEoBd9nZsMAC77NKQqf403mXnXTz35s" },
function(data) {
$.each(data.items, function(i, item){
console.log(item);
})
}
);
});
I don't know what I am doing wrong here
Upvotes: 0
Views: 237
Reputation: 944473
You missed the comma at the end of the previous line.
The parser doesn't expect an identifier immediately after a string. It expects a comma.
Upvotes: 1