How do I get the YouTube video ID from GDataEntryYouTubeVideo?

I'm using the GData/YouTube direct upload api. When the upload is finish the following method gets called:

- (void)uploadTicket:(GDataServiceTicket *)ticket
  finishedWithEntry:(GDataEntryYouTubeVideo *)videoEntry
           error:(NSError *)error {

How can I get the YouTube video ID of the just uploaded video from the returned (GDataEntryYouTubeVideo *)videoEntry?

Answers


Using this worked for me:

NSString * videoID = videoEntry.mediaGroup.videoID;

You can get the URL from

[[[[videoEntry mediaGroup] mediaContents] objectAtIndex:0] URLString];

This comes with some query string cruft, but the base URL is the video (once the processing's been completed).


Need Your Help

Android Google Play Service Lifetime

android service android-lifecycle google-play-services

i just implemented an application that use Location Updates with the new Google 2013 I/O Api (Google Play Services) : http://developer.android.com/training/location/receive-location-updates.html

jQuery load finish-event not working?

javascript jquery html ajax

i want to expand a division with data that should be loaded from another server.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.