从谷歌地图api获取评论 [英] Get reviews from google map api

查看:145
本文介绍了从谷歌地图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}





回应:

  {
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:-

https://maps.googleapis.com/maps/api/place/details/json?reference=CmRYAAAAciqGsTRX1mXRvuXSH2ErwW-jCINE1aLiwP64MCWDN5vkXvXoQGPKldMfmdGyqWSpm7BEYCgDm-iv7Kc2PF7QA7brMAwBbAcqMr5i1f4PwTpaovIZjysCEZTry8Ez30wpEhCNCXpynextCld2EBsDkRKsGhSLayuRyFsex6JA6NPh9dyupoTH3g&sensor=true&key=AddYourOwnKeyHere

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}

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆