如何使用 PHP 我的公司 api 获得 google 评论回复?

How to get google review reply using PHP my business api?

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

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

获得评论的回复(回复)

我该怎么做?

请参阅 developers.google.com 在您收到的 reviewReply 包含您的回复的对象中

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

more info

要获取评论,请使用 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");
  }