Search code examples
videoyoutube-apigdata

editLink is null when using youtube api to change a youtube video from private to public


I am trying to update a youtube video from private to public. But the editlink I got in respond is null.

Here's my code:

// returns a youtube service
GDataServiceGoogleYouTube *service = [self youtubeService];
[service setAuthToken:[self getRequestToken]];

NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://gdata.youtube.com/feeds/api/videos/%@?v=2&key=%@", youtube_id, DEVELOPER_KEY]];
GDataServiceTicket *ticket;
ticket = [service fetchFeedWithURL:url delegate:self didFinishSelector:@selector(didFinishFetchingVideo:withEntry:error:)];

in callback, [videoEntry editLink] is null.


Solution

  • I believe that only video entries from the uploads feed are editable. So you'd want to use the following URL pattern:

    https://gdata.youtube.com/feeds/api/users/default/uploads/%@?v=2&key=%@