我目前正在使用 Google 的 api 来获取 Google My Business Account 的评论。我们为我们的客户执行此操作,他们必须为我们启用 oauth,因此我们可以拥有访问令牌和刷新令牌。
我们得到的响应结构如下: url: https://mybusiness.googleapis.com/v4/accounts/{account_id}/locations/{location_id}/reviews
{
"reviews": [
{
"reviewId": "some-id,
"reviewer": {
"profilePhotoUrl": "some-url",
"displayName": "Some Sample Name"
},
"starRating": "FOUR",
"comment": "Some long comment left by the user.",
"createTime": "2021-02-15T14:35:19.252Z",
"updateTime": "2021-02-15T14:35:19.252Z",
"reviewReply": {
"comment": "Some long reply by the business.",
"updateTime": "2021-03-04T16:49:32.973Z"
},
"name": "accounts/{account_id}/locations/{location_id}/reviews/{review_id}"
},
...
],
"averageRating": 4.5,
"totalReviewCount": 1312,
"nextPageToken": "some-page-token"
}
问题是,对于某些客户端,我们得到的只是一个空对象(从字面上看,我们接收{}
的是响应体)。我们不确定为什么会发生这种情况,因为我们能够在客户的网站上看到评论,而且我们没有收到任何错误。我们已经刷新了令牌并刷新了令牌,但没有任何成功。
我已尝试通过 GCP 发布支持票证以获得一些指导,但如果您没有正确的支持计划,您似乎无法在此类问题上获得任何帮助。
无论如何,非常感谢您对这个问题的任何帮助(为什么会发生?可以修复吗?是设置问题吗?等等)。