1

我正在为我的应用程序使用 PHP Google MyBusiness API。我有商业评论。

现在我想获得与特定评论相关的任何回复。我可以发布回复,但我想使用 PHP GMB API 获得评论的回复(回复)。

我该怎么做?

4

1 回答 1

2

在您获得包含您回复的对象的响应中查看developers.google.comreviewReply

{
  "reviewId": string,
  "reviewer": {
    object(Reviewer)
  },
  "starRating": enum(StarRating),
  "comment": string,
  "createTime": string,
  "updateTime": string,
  "reviewReply": {
    object(ReviewReply)
  },
}

更多信息

要获得评论,请使用 get 方法Google_Service_MyBusiness_AccountsLocationsReviews_Resource

class Google_Service_MyBusiness_AccountsLocationsReviews_Resource extends Google_Service_Resource
{

  /**
   * Returns the specified review. This operation is only valid if the specified
   * location is verified. Returns `NOT_FOUND` if the review does not exist, or
   * has been deleted. (reviews.get)
   *
   * @param string $name The name of the review to fetch.
   * @param array $optParams Optional parameters.
   * @return Google_Service_MyBusiness_Review
   */
  public function get($name, $optParams = array())
  {
    $params = array('name' => $name);
    $params = array_merge($params, $optParams);
    return $this->call('get', array($params), "Google_Service_MyBusiness_Review");
  }
于 2017-12-11T05:33:32.120 回答