I'm using the following code for get the users details via google plus login.
$token = $this->session->userdata('access_token');
$client = new Google_Client();
$client->setAccessToken($token);
$response = $this->_gp_plus->people->get('me');
but it returns the following details only
[kind] => plus#person
[etag] => "RqKWnRU4WW46-6W3rWhLR9iFZQM/IyjIQXmlWZGNFFImOAvg7vCilO0"
[gender] => male
[objectType] => person
[id] => 116202429381449556139
[displayName] => Vijay Kumar
[name] => Array
(
[familyName] => Kumar
[givenName] => sara
)
[url] => https://plus.google.com/116202429381449556139
[image] => Array
(
[url] => https://lh5.googleusercontent.com/-ae5axUqF88I/AAAawAAAAAssAAAI/AAAAAAAAssACo/djlbpkT0Okc/photo.jpg?sz=50
[isDefault] =>
)
[isPlusUser] => 1
[circledByCount] => 57
[verified] =>
the Email address is not returned here. anybody know what is the problem?
A few things:
email
scope, you will not receive emailFor Sign-in, you will do the OAuth 2.0 web flow as described in the Google Sign-in documentation.