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

How to implement photos in Google My Business API?

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

Hi Team,

 

I am using the Google MyBusiness API for PHP very successfully, but one thing doesn't work as expected.....

I try to implement photos at my update and create methods.

$photos = new Google_Service_Mybusiness_Photos();
$photos->setLogoPhotoUrl($aLocationInfo['photos']);
$location->setPhotos($photos);

In the $aLocationInfo['photos'] array I have the url to the image.

I've tried also $photos->setAdditionalPhotoUrls etc. 

But the response is always: "(400) Request contains an invalid argument." 

Could someone give me a hand?

Thanks in advance!

 

Best regards,

Martin

2 Expert replyverified_user

Re: How to implement photos in Google My Business API?

Google Employee
# 2
Google Employee

Hi @Martin L,

 

We don’t have enough information from you to troubleshoot this issue you posted.

 

The PHP client library currently doesn’t support the display of detailed error messages. Thus, please follow the Make a simple HTTP request step on the Get Started page of the documentation website to learn how to use the OAuth 2.0 Playground for troubleshooting errors when sending requests with data via the Google My Business API.

Thanks,

The Google My Business API team

How to implement photos in Google My Business API?

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Team,

 

Am also having the same problem when including the google_my_business-photos.

$photos = new Google_Service_MyBusiness_Photos();
$photos->setCoverPhotoUrl("http://****.com/mybusiness_photos/banner.jpg");
$location->setPhotos($photos);

Can any one help on this?

 

 

thanks,

Babu.

Re: How to implement photos in Google My Business API?

Google Employee
# 4
Google Employee

Hi @Praveen Kumar G,

 

Please specify what issue you are getting while adding photos to your location using the Google My Business API?

 

Please make sure the photos meet the Google My Business guidelines and the specifications of the Photos object documented on our Google Developers site and also note that, the profilePhotoUrl and coverPhotoUrl should always under a Google domain.

 

Thanks,

The Google My Business API team