Bha*_*iya 5 javascript php google-places-api google-my-business-api
我需要针对特定位置的所有谷歌评论,但我无法使用谷歌的业务API.这是获取请求的URL
https://mybusiness.googleapis.com/v3/accounts/account_name/locations/location_name/reviews
Run Code Online (Sandbox Code Playgroud)
现在我的问题是param account_name和location_name的值是什么我怎么能得到它.
请回答示例位置示例
我认为首先你需要将你的google my business api白名单列入你的项目作为私人api的任何项目.Google我的商家api将处理与您的帐户相关联的位置,因此请务必从您知道的任何帐户验证LOCATIONS.然后,您可以尝试在OAuthplayground中提到的api调用.
设置等后,您将自动了解帐户ID和位置ID.
还有更多的网址,你可以更好地了解它.
当您向https://mybusiness.googleapis.com/v3/accounts它提出请求时,它会为您提供一个帐户列表。在这些帐户上,他们有一个名为 name 的字段。该字段是帐户/帐户名称。
{
"state": {
"status": "UNVERIFIED"
},
"type": "PERSONAL",
"name": "accounts/1337",
"accountName": "example"
}
Run Code Online (Sandbox Code Playgroud)
当您向https://mybusiness.googleapis.com/v3/accounts/account_name/locations它发出请求时,它会为您提供位置列表。在这些位置,他们有一个名为 name 的字段。该字段是accounts/account_name/locations/location_name。
{
"locations": [
{
"languageCode": "en",
"openInfo": {
"status": "OPEN",
"canReopen": true
},
"name": "accounts/1337/locations/13161337",
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
9310 次 |
| 最近记录: |