My Business
5.3K members online now
5.3K members online now
For developers who are using the Google My Business API to manage locations
Guide Me
star_border
Reply

Reply to review via PHP API

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hello,
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 :)

Thanks,
Bojan 

1 Expert replyverified_user

Reply to review via PHP API

Visitor ✭ ✭ ✭
# 2
Visitor ✭ ✭ ✭

Can anyone help with this?
It's urgent!

Thanks :)

Re: Reply to review via PHP API

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

@Terry WCan you help me with my problem?
Thanks :)

Re: Reply to review via PHP API

Google Employee
# 4
Google Employee

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.

 

Thanks,

The Google My Business API team