相关疑难解决方法(0)

从google places API获取数据后获取状态"REQUEST_DENIED"

我做到了

    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://maps.googleapis.com/maps/api/place/search/json?location=30.722322,76.76126&radius=500&types=food&sensor=true&key=any_apiKey"]];

    NSURLResponse *response;
    NSError *error;
    NSData *responseData = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
    NSString *strResponse = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding];
    NSLog(@"%@",strResponse);

    SBJSON *sbJason = [[SBJSON alloc] init];
    NSMutableDictionary *getPlaceList = [sbJason objectWithString:strResponse]; 
Run Code Online (Sandbox Code Playgroud)

//但我得到了这个 -

   {
 "html_attributions" : [],
  "results" : [],
 "status" : "REQUEST_DENIED"
 }
Run Code Online (Sandbox Code Playgroud)

**API Key是否有任何问题我已经写了谷歌地图给出的API密钥.api密钥有什么问题或者请告诉我这里是google api链接

iphone google-maps objective-c google-maps-api-3 ios

5
推荐指数
2
解决办法
4940
查看次数