English 中文(简体)
缩略语
原标题:iOS GData multiple youtube uploads

我正在提出申请,要求把几部录像带上你。 GData先生的问题是,我不知道如何将信息传递给它的备用功能,以便我能够区分不同载荷。

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

在ASIHttpRequest,有“用户信息”财产,使用户能够将信息传递给请求Finish的反馈。 GData 您调高负荷的要求是什么?

- (void)uploadToYoutube: (NSString *)login andPassword:(NSString *)password withVideo:(NSData *)videoData forSighting:(SightingDB *)sighting {


    [service setYouTubeDeveloperKey:DEVELOPER_KEY];

    NSURL *url = [GDataServiceGoogleYouTube youTubeUploadURLForUserID:kGDataServiceDefaultUser];


    NSString *titleStr =  @"title";

    // gather all the metadata needed for the mediaGroup

    GDataMediaTitle *title = [GDataMediaTitle textConstructWithString:titleStr];
    [titleStr release];

    NSString *categoryStr = @"Entertainment";
    GDataMediaCategory *category = [GDataMediaCategory mediaCategoryWithString:categoryStr];
    [category setScheme:kGDataSchemeYouTubeCategory];

    NSString *descStr = @"descripion"

    GDataMediaDescription *desc = [GDataMediaDescription textConstructWithString:descStr];
    [descStr release];

    NSArray *kwords = [[NSArray alloc] initWithObjects:@"xxx",@"weee",nil];
    GDataMediaKeywords *keywords = [GDataMediaKeywords keywordsWithStrings:kwords];



    BOOL isPrivate = NO;

    GDataYouTubeMediaGroup *mediaGroup = [GDataYouTubeMediaGroup mediaGroup];
    [mediaGroup setMediaTitle:title];
    [mediaGroup setMediaDescription:desc];
    [mediaGroup addMediaCategory:category];
    [mediaGroup setMediaKeywords:keywords];
    [mediaGroup setIsPrivate:isPrivate];

    NSString *mimeType = [GDataUtilities MIMETypeForFileAtPath:@""
                                               defaultMIMEType:@"video/mp4"];

    // create the upload entry with the mediaGroup and the file data
    GDataEntryYouTubeUpload *entry;

    entry = [GDataEntryYouTubeUpload uploadEntryWithMediaGroup:mediaGroup
                                                          data:videoData
                                                      MIMEType:mimeType
                                                          slug:@"movie.mov"];



    SEL progressSel = @selector(ticket:hasDeliveredByteCount:ofTotalByteCount:);
    [service setServiceUploadProgressSelector:progressSel];

    GDataServiceTicket *ticket;
    ticket = [service fetchEntryByInsertingEntry:entry
                                      forFeedURL:url
                                        delegate:self
                               didFinishSelector:@selector(uploadTicket:finishedWithEntry:error:)];
问题回答

机票支持购物:对凯西:以及一套 用户Data:

或者只是使用区块,而不是代表或选择。





相关问题
List Contents of Directory in a UITableView

I am trying to list the contents of Ringtones directory in a TableView, however, I am only getting the last file in the directory in ALL cells, instead of file per cell. This is my code: - (...

iPhone NSUserDefaults persistance difficulty

In my app i have a bunch of data i store in the NSUserdefaults. This information consists of an NSObject (Object1) with NSStrings and NSNumbers and also 2 instances of yet another object (Object2). ...

Writing a masked image to disk as a PNG file

Basically I m downloading images off of a webserver and then caching them to the disk, but before I do so I want to mask them. I m using the masking code everyone seems to point at which can be found ...

Resize UIImage with aspect ratio?

I m using this code to resize an image on the iPhone: CGRect screenRect = CGRectMake(0, 0, 320.0, 480.0); UIGraphicsBeginImageContext(screenRect.size); [value drawInRect:screenRect blendMode:...

Allowing interaction with a UIView under another UIView

Is there a simple way of allowing interaction with a button in a UIView that lies under another UIView - where there are no actual objects from the top UIView on top of the button? For instance, ...

热门标签