I work about 10 hours and I completely lost 100%. I'm trying to just request youtube, say, for "iPad". Then youtube should return a list of search results ... But I'm having all kinds of problems. Here is my code:
// Create a service object for executing queries GTLServiceYouTube *service = [[GTLServiceYouTube alloc] init]; // Services which do not require sign-in may need an API key from the // API Console service.APIKey = @"AIzaSyD9pvsUtnegJvwv5z5XrBO5vFTBVpErYN8"; // Create a query GTLQueryYouTube *query = [GTLQueryYouTube queryForSearchListWithPart:@"video"]; query.q = @"hiking boots"; //query.country = @"US"; // Execute the query GTLServiceTicket *ticket = [service executeQuery:query completionHandler:^(GTLServiceTicket *ticket, id object, NSError *error) { // This callback block is run when the fetch completes if (error == nil) { //I'VE NEVER GOTTEN TO HERE, I ALWAYS GET AN ERROR } }else{ NSLog(@"Error: %@", error.description); } }];
If I do this, I get the following error:
Error Domain=com.google.GTLJSONRPCErrorDomain Code=403 "The operation couldn't be completed. (Access Not Configured)" UserInfo=0x1edab4c0 {error=Access Not Configured, GTLStructuredError=GTLErrorObject 0x1eda3f80: {message:"Access Not Configured" code:403 data:[1]}, NSLocalizedFailureReason=(Access Not Configured)}
What should I do?
source share