iosyoutube-apikeywordplaylistplaylists

google-api-objectivec-client youtube playlist feed has no keywords


The GData API shows a different behaviour today then it did yesterday.

I am fetching a couple of playlists in my iOS app like this:

[[self youTubeService] fetchFeedWithURL:[[playlistLink content] sourceURL]
                                          delegate:self
                                          didFinishSelector:@selector(playlistTicket:finishedWithFeed:error:)];

In my callback

- (void)playlistTicket:(GDataServiceTicket *)ticket finishedWithFeed:(GDataFeedYouTubePlaylist *)feed error:(NSError *)error {

    if(!error){
        _receivedPlaylistFeeds += 1;

        NSMutableDictionary* sectionDict =  [[NSMutableDictionary alloc] init];
        NSMutableArray* sectionEntries = [[NSMutableArray alloc] init];

        for(GDataEntryYouTubeVideo* entry in feed.entries){

            GDataYouTubeMediaGroup* mediaGroup = [entry mediaGroup];
            GDataMediaKeywords* mediaKeywords = [mediaGroup mediaKeywords];
            NSArray* keyword = [mediaKeywords keywords];
        }
  }}          

keywords is nil. Yesterday it wasn't. I depend on those keywords and dont know what might be the problem. I checked [[playlistLink content] sourceURL] in the browser and it loads xml with keywords included. So I have no Idea what caused the change in behaviour. For me its critical. The App is already out in the AppStore...


Solution

  • media:keywords are returned empty if user is not the owner of the video.

    http://apiblog.youtube.com/2012/08/video-tags-just-for-uploaders.html

    edit: see my comment below on how i worked around it