我正在为我的应用程序使用PHP Google MyBusiness API。我有商业评论。
现在我想获得与特定评论相关的任何回复。我可以发布回复,但我希望使用PHP GMB API获得回复(回复)。
我该怎么做?
答案 0 :(得分:2)
在您收到回复的reviewReply
对象的回复中查看developers.google.com
{
"reviewId": string,
"reviewer": {
object(Reviewer)
},
"starRating": enum(StarRating),
"comment": string,
"createTime": string,
"updateTime": string,
"reviewReply": {
object(ReviewReply)
},
}
要获得审核的使用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");
}