I am trying to get Google+ connections that are visible. by referring to documentation https://developers.google.com/+/web/samples/php, it is clear that on adding 'plus.login' scope fetches G+ connections, age range and language.
But in my case this scope only asks permission for fetching age range and language. I am not able to fetch G+ connections.
I tried using google-api-php-client in my application. Also followed the quick start guide as mentioned in fresh application but access permission page does not include G+ connection in circle permission.
part of the code is below
define('SCOPES', implode(' ',array(
Google_Service_Plus::PLUS_ME, Google_Service_Plus::PLUS_LOGIN,Google_Service_Plus::USERINFO_EMAIL, Google_Service_People::CONTACTS
))
);
Class GoogleClient {
function getClient() {
$client = new Google_Client();
$client->setApplicationName(APPLICATION_NAME);
$client->setScopes(SCOPES);
$client->setAuthConfig(CLIENT_SECRET_PATH);
$client->setAccessType('offline');
$this->authUrl = $client->createAuthUrl();
redirecting to the above created AuthUrl results in asking permissions displayed in picture
$plusConnections = new \Google_Service_Plus($client);
$optParamsConnections = ['maxResults' => 99];
$_people = $plusConnections->people->listPeople('me', 'visible', $optParamsConnections);
$_people doesnt get any data. however for the same user when tried on Google API explorer, the connections are retrived
any suggestion why is this strange behaviour and how to resolve it thanks
