使用Gdata获取google Docs文件matadata时出错

时间:2015-05-29 08:55:56

标签: google-docs gdata

从上一天开始,我在处理Google Docs文件matadata之前遇到错误,因为它工作正常。现在它显示错误。

Error Domain=com.google.GDataServiceDomain Code=404 "The operation couldn’t be completed. (com.google.GDataServiceDomain error 404.)"

我的代码是

 NSURL *entryURL = [GDataServiceGoogleDocs metadataEntryURLForUserID:kGDataServiceDefaultUser];

    GDataServiceGoogleDocs *service = [self docsService];

    GDataServiceGoogleSpreadsheet *spreadsheetService;
    spreadsheetService = [[[GDataServiceGoogleSpreadsheet alloc] init] autorelease];

    GDataServiceGoogleDocs *docsService = [self docsService];
    [spreadsheetService setUserAgent:[docsService userAgent]];
    [spreadsheetService setUserCredentialsWithUsername:[docsService username]
                                              password:[docsService password]];

    [service fetchEntryWithURL:entryURL
             completionHandler:^(GDataServiceTicket *ticket, GDataEntryBase *entry, NSError *error) {
                 // callback
                 [self setMetadataEntry:(GDataEntryDocListMetadata *)entry];
                 if (error != nil) {
                     NSLog(@"Error fetching user metadata: %@", error);
                 }
             }];

0 个答案:

没有答案