ios中的Google API错误
我正在尝试通过谷歌API获取用户信息。但是 我犯了以下错误ios中的Google API错误,ios,iphone,objective-c,api,google-api,Ios,Iphone,Objective C,Api,Google Api,我正在尝试通过谷歌API获取用户信息。但是 我犯了以下错误 error: { errors: [ { domain: "usageLimits", reason: "accessNotConfigured", message: "Access Not Configured. Please use Google Developers Console to activate the API for your project." } ],
error: {
errors: [
{
domain: "usageLimits",
reason: "accessNotConfigured",
message: "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
],
code: 403,
message: "Access Not Configured. Please use Google Developers Console to activate the API for your project."
}
}
我的代码如下:
-(void)get_real_profile:(NSString*)userid
{
// POST parameters
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://www.googleapis.com/plus/v1/people/%@?key=xxxxxxxxxxxxxxxxx",userid]];
NSMutableURLRequest *urlRequest = [NSMutableURLRequest requestWithURL:url];
[urlRequest setHTTPMethod:@"GET"];
[urlRequest setValue:userid forHTTPHeaderField:@"userId"];
[NSURLConnection sendAsynchronousRequest:urlRequest
queue:[NSOperationQueue mainQueue]
completionHandler:^(NSURLResponse *response,
NSData *data,
NSError *connectionError) {
NSDictionary *json = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
NSLog(@"%@",json);
}];
}
我无法启用此应用的计费。那么,是否存在有关禁用计费的任何问题。
帮我解决这个问题。
谢谢,
api和Auth
概述
链接上方