Firstly, I just want to say what information I need to get from the user.
- Full name (first / last)
- Email address (primary account, not @ google-plus.com)
- Location (country, state, city, address)
- Youtube username
To get all this information, I went and downloaded / installed the PHP-Client library located here .
Since this is my first time using the API, I looked around and found the following areas:
$client->setScopes(array('https://www.googleapis.com/auth/youtube.readonly', 'https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email'));
For some reason, when I run this:, $myData = $GoogleData->userinfo->get('me');I get the following:
Undefined property: Google_Service_Plus::$userinfo in path/test.php on line 61
Not too sure what I'm doing wrong, or even if I have to use Google Plus Api to get this information.
( YouTube) .. Google. ?
-, API Google ( )
. sooo . , , , , .