Sunday, 1 September 2013

How can i get the number of views in the Google Youtube API?

How can i get the number of views in the Google Youtube API?

I'm using the YouTube API to very simply fetch some videos and display
them in a UITableView in my iPhone app,
The problem is this:
the number of views of video always returns null
Here is my code
NSString *title = [[entry title] stringValue];
NSString *viewCount=[[[(GDataEntryYouTubeVideo *)entry
statistics]viewCount] stringValue];
NSLog(@"%@",viewCount); // returns null
NSArray *thumbnails = [[(GDataEntryYouTubeVideo *)entry mediaGroup]
mediaThumbnails];
Thanks.

No comments:

Post a Comment