juanv911/SocialCounters

YouTube Channel IDs

FelineThemes opened this issue · 1 comments

I can't seem to get the 'youtube_user' option to work using channel IDs on a channel that doesn't have a set username, but instead is basically a code of a few numbers and letters. (ex: 'UCTEzzaSvpXG70LRETBFt7qA')

It works just fine with a set username... but not with a channel ID.

This is to do with YouTube depreciating the use of custom usernames. If your channel has a Channel ID, replace the below value in the api.js file (line 166):

forUsername:settings.youtube_user,

Replace with:
id:settings.youtube_user,

And then change line 173 from:
$('#wrapper .item.youtube').attr('href','https://youtube.com/'+settings.youtube_user);

To this:
$('#wrapper .item.youtube').attr('href','https://youtube.com/channel/'+settings.youtube_user);