Hello,
I'm trying to customize a table view to display a feed of youtube videos based on a search query. I found this code http://pastebin.com/vmV2c0HT which displays a feed of a YouTube channel in a tableview, it works fine. However, when modifying the viewDidLoad function to search for a query instead of a user feed, I always end up with a blank table view.
Here is my viewDidLoad function:
- (void)viewDidLoad {
GDataServiceGoogleYouTube *service = [self youTubeService];
NSString *searchString = @"football";
NSString *uploadsID = kGDataYouTubeUserFeedIDUploads;
NSURL *feedURL = [GDataServiceGoogleYouTube youTubeURLForFeedID:nil];
GDataQueryYouTube* query = [GDataQueryYouTube youTubeQueryWithFeedURL:feedURL];
[query setVideoQuery:searchString];
[query setMaxResults:5];
[service fetchFeedWithQuery:query delegate:self didFinishSelector:@selector(entryListFetchTicket:finishedWithFeed:)];
[super viewDidLoad];
}
Any help would be appreciated.
--------------------- SOLUTION ----------------------
The problem was in two parts:
-There was a mistake in the query fetch call, change it to:
[service fetchFeedWithQuery:query delegate:self didFinishSelector:@selector(request:finishedWithFeed:error:)];
the other selector method wasn't implemented
- The service should not follow next links coz then all the feed will be fetched
[_service setServiceShouldFollowNextLinks:NO];