Reply to review via PHP API[ Edited ]
February 2017 - last edited February by Shalini S
I've been trying to make the reply of a review, but with no success. I am able to connect to the GMB api and everything is working except the reply.
Can you guide me to make this happen?
My current code for the reply is:
$mybusinessService = new Google_Service_Mybusiness($client); $reviews = $mybusinessService->accounts_locations_reviews; $comment = "Thanks for the review"; $name ="accounts/xxx/locations/xxx/reviews/xxx/reply"; $review_reply = $reviews->reply($name, $comment);
I have no error, nothing happens so don't know what I am doing wrong.
Please advice :)
Re: Reply to review via PHP API
Hi @Bojan P
After looking at your code, I think you are missing a method Google_Service_Mybusiness_ReviewReply() in your code when reply a review in Google My Business API. Please checkout this solution for the code snippet to update a reply to the specified review (or create a new reply if one doesn't exist) with the Google API Client Library for PHP.
Since the PHP client library doesn’t currently support the display of detailed error messages, so we suggest you follow the Make a simple HTTP request step-by-step guide on the Google Developers site and try use the OAuth 2.0 Playground to step through the auth flow, and examine the HTTP request/response at each step. This usually helps pinpoint where an application is passing the incorrect info.
The Google My Business API team