Search code examples
objective-ciosfile-uploadyoutubegdata

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?


Solution

  • Using this worked for me:

    NSString * videoID = videoEntry.mediaGroup.videoID;