Any help would be much appreciated!
Current code:
YouTubeRequest request = Connect();
Video video = new Video();
video.Tags.Add(new MediaCategory("Nonprofit", YouTubeNameTable.CategorySchema));
video.Keywords = "Test";
video.YouTubeEntry.setYouTubeExtension("location", "UK");
The below method takes in a YouTube video retrieved from the YouTube request service and also takes in the type of permission and the new permissions.
NOTE this will only work on a retrieved video, not if you pass in a “new Video()“
what it does is, iterates over all the ExtentionElements that you tube returned as part of the feed, and extracts the xml extension elements (as there isn’t a build in c# access control extension) takes the elements that match where the action == type then updates the permissions attribute to the required value.
When the video entry is sent and updated to the YouTube server the updated access control elements are sent back and with the update request.