1
下面的代码:谷歌Places API的,添加的地方总是返回INVALID_REQUEST
googleMapsAPICall = "https://maps.googleapis.com/maps/api/place/add/json?sensor=true&key=MY_KEY_HERE";
HttpPost post = new HttpPost(googleMapsAPICall);
String postBody = "{\"location\":{\"lat\":-33.8669710,\"lng\":151.1958750},\"accuracy\":50.0,\"name\":\"testingjson\",\"types\":[\"other\"],\"language\":\"en\"}";
StringEntity se = new StringEntity(postBody,HTTP.UTF_8);
post.setEntity(se);
httpClient = new DefaultHttpClient();
response = httpClient.execute(post);
你能看到什么了吗?
http://stackoverflow.com/questions/7417764/google-places-add-place-invalid-request-error我有同样的问题。你的情况有什么问题? – marcinn
不幸的是,[Place Add](https://developers.google.com/places/web-service/add-place)已于2017年6月30日弃用,并将于2018年6月30日停止使用。因此,您无法使用这种方法了。有关详细信息,请参阅相应的[地理博客文章](https://maps-apis.googleblog.com/2017/06/announcing-deprecation-of-place-add.html)。 – xomena