Question

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...

Was it helpful?

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

OTHER TIPS

I rely on keywords as well... and my web page crashed for two days, unbeknownst to me.

You can still access your videos' keywords. When you set up your YouTube Request Settings... you'll need to provide the username and password to authenticate that you are the owner.

https://developers.google.com/youtube/2.0/developers_guide_protocol#Authentication

OR

https://developers.google.com/youtube/code , then navigate to your code's Authentication section.

My page is working now that I included the two additional parameters.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top