Im struggling a lot with this issue and I just cant seem to find the answer to any of my questions.
The task that I have been set is to have the ability to list all of the reviews for a customers business.
So the workflow would be
- Log into the platform
- Go to the social settings page and auth google
- Somewhere in the interface show all reviews from google my business
So far ive created the oAuth tokens, Added the client and secret and am getting valid tokens
This is where I have become stuck, Im using https://github.com/googleapis/google-api-php-client
Should I be using this? I cant find exactly how to actually use it for getting the reviews etc.
A quick snipped of using the client is here
$client = new Client();
$client->setClientId($wholeSaler->getGoogleConsumerKey());
$client->setClientSecret($wholeSaler->getGoogleConsumerSecret());
$client->setRedirectUri('https://' . SiteSession::get_url() . '/api/google-auth/');
$client->addScope(self::getScopes());
$client->setAccessToken($this->getFullToken());
return $client;
This gets me a valid instance of "Client" But I cant seem to find where to go from here
Do these classes $something2 = new \Google\Service\MyBusinessBusinessInformation(); Actually do the work? Or do I create my own API Calls?
Any little nudge forward on this would be greatly appreciated!
Cheers Ryan