从谷歌地图api获取评论 [英] Get reviews from google map api
问题描述
我必须从Google地图API获取评论。详细信息位于此页面上。
https://developers.google.com/places/documentation/details#PlaceDetailsResults
详细信息将从此页面获取: -
'p> https://maps.googleapis.com/maps/api/place/details/json?reference=CmRYAAAAciqGsTRX1mXRvuXSH2ErwW-jCINE1aLiwP64MCWDN5vkXvXoQGPKldMfmdGyqWSpm7BEYCgDm-iv7Kc2PF7QA7brMAwBbAcqMr5i1f4PwTpaovIZjysCEZTry8Ez30wpEhCNCXpynextCld2EBsDkRKsGhSLayuRyFsex6JA6NPh9dyupoTH3g&sensor=true&key=AddYourOwnKeyHere
我的问题是我找不到什么是参考请求。以及如何从我的Google plus页面中找到此参数值。
更新近的方法:
https://maps.googleapis.com/maps/api/place/details/json?placeid= {place_id}& key = {api_key}
- place_id: https://developers.google.com/places/place-id
- api_key: https://developers.google.com/places/web-service/get-api-key
回应:
{
html_attributions:[],
result:{
...
rating:4.6,
reviews:[
{
author_name:John Smith,
author_url:https://www.google.com/maps/contrib/106615704148318066456/reviews,
language: en,
p rofile_photo_url:https://lh4.googleusercontent.com/-2t1b0vo3t-Y/AAAAAAAAAAI/AAAAAAAAAHA/0TUB0z30s-U/s150-c0x00000000-cc-rp-mo/photo.jpg,
rating: 5,
relative_time_description:在上周,
text:太棒了! 5星!,
时间:1508340655
}
]
}
}
评论仅限最新的5本。
I have to get reviews from Google map API. details are on this page.
https://developers.google.com/places/documentation/details#PlaceDetailsResults
the details will fetch from this page:-
My problem is I can't find what is reference in request. and how I find this parameter value from my Google plus page.
A more recent way to do this:
https://maps.googleapis.com/maps/api/place/details/json?placeid={place_id}&key={api_key}
- place_id: https://developers.google.com/places/place-id
- api_key: https://developers.google.com/places/web-service/get-api-key
Response:
{
"html_attributions": [],
"result": {
...
"rating": 4.6,
"reviews": [
{
"author_name": "John Smith",
"author_url": "https://www.google.com/maps/contrib/106615704148318066456/reviews",
"language": "en",
"profile_photo_url": "https://lh4.googleusercontent.com/-2t1b0vo3t-Y/AAAAAAAAAAI/AAAAAAAAAHA/0TUB0z30s-U/s150-c0x00000000-cc-rp-mo/photo.jpg",
"rating": 5,
"relative_time_description": "in the last week",
"text": "Great time! 5 stars!",
"time": 1508340655
}
]
}
}
Reviews are limited to the 5 latest.
这篇关于从谷歌地图api获取评论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!