I have some google script that updates a youtube video of mine to include the number of views in the title. I got the code from the Internet and it works great.
But I want it to amend the title of a video in one of my channels underneath my youtube account. And it always complains that it doesnt have rights.
Is almost s is the script is associated with my youtube/google account whilst a channel that I have set up under my youtube account, this script doesnt have access to.
If you know how to do this, I will pay you for your time to show me how.
The code is below...
function UpdateOneYouTubeVideo() {
var videoID = 'BvzOHXTXXXX'; var part = 'snippet,statistics'; var params = {'id': videoID};
var response = YouTube.Videos.list(part, params); var video = response.items[0]; var videoViewsCount = video.statistics.viewCount; var videoLikeCount = video.statistics.likeCount; var videoDislikeCount = video.statistics.dislikeCount; var videoCommentCount = video.statistics.commentCount;
var videoTitle = 'This awesome fantastic video has ' + videoViewsCount + ' views, ' + videoLikeCount + ' likes and ' + videoDislikeCount + ' dislikes. It also has ' + videoCommentCount + ' comments!!!';