Closed jamulligan13 closed 6 years ago
find the User ID at -> https://www.youtube.com/account_advanced
@jamulligan13 youtube.com/channel/xxxxxxx is not the same as the user id...
Didn't work for me either, it only works using the old user display names (e.g. 'amazonwebservices') but Youtube is now using a different format (e.g. 'UC_0ACpAdC8...')
To make it work, I used YouTube Channel ID (not YouTube User ID) found on https://www.youtube.com/account_advanced
Also had to change model-youtube-api.js line 51 to:
url: "https://www.googleapis.com/youtube/v3/channels?part=snippet,id&id="+this.youtubeUser+"&key=" + this.devKey,
Yes please use Channel ID.
Hello, I have tried running this and I am getting this error:
model-youtube-api.js:59 Uncaught TypeError: Cannot read property 'snippet' of undefined
at YouTubeAPIModel.
I have tried changing my user ID to Chanel ID and get the same error message. I tried to change model-youtube-api.js line 51 to: url: "https://www.googleapis.com/youtube/v3/channels?part=snippet,id&id="+this.youtubeUser+"&key=" + this.devKey, like glotv did and have had no luck.
This is kind of a hacky solution but it fixes the issue without needing to modify model-youtube-api.js
.
Add this before 'use strict';
in init.js
:
var newYouTubeAPIModel = YouTubeAPIModel.toString();
newYouTubeAPIModel = newYouTubeAPIModel.replace("snippet&forUsername=", "snippet,id&id=");
delete YouTubeAPIModel;
eval(newYouTubeAPIModel);
I don't know if this is a related or separate issue but I also noticed if you have an empty playlist, there will be an error about a missing snippet IIRC.
For the Youtube project, I setup the init.js with my dev key and user id. As a more recent channel, it is setup from Google+, so the User ID is a long string of letters. its found as youtube.com/channel/xxxxxxx using that id it does not work. If I use what it is setup as for its custom url, it pulls up to another account with the same user name but setup before Google + so it all functions