我已经做到了获取状态“REQUEST_DENIED”从谷歌获取数据后,会将API
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];
//但是我得到这个 -
{
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}
**有没有用API密钥的任何问题我已经写了谷歌地图给出的API密钥。是否有与API密钥或者是什么,请告诉我这里是link of google api
你真的把“any_apikey”作为你的api关键字吗? –
不,不,它不是我真正的API密钥。我有谷歌给出不同的API密钥 –
好,好:)只是想检查 –