[英]Google API Error in ios
我正在嘗試通過Google API獲取用戶信息。 但是我得到了以下錯誤。
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);
}];
}
我沒有為此應用啟用結算功能。 因此,是否有關於計費被禁用的任何問題。
幫我解決這個問題。
謝謝,
APIs and Auth
overview
鏈接上方
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.