![Picture of Sebas Picture of Sebas](/graphics/unknown.gif)
Sebas - 2017-08-20 15:27:46
Hello Manuel,
Here is example hot to get VK email, I hope you can implement it to your awesome class!
First of all in the scope add email string - 'scope'=>'email'
if(isset($_GET['code'])){
$params = array(
'client_id' => $this->clientId,
'client_secret' => $this->clientSecret,
'code' => $_GET['code'],
'redirect_uri' => $this->redirectUri
);
$tokenInfo = $this->get('https://oauth.vk.com/access_token', $params);
and now User's email is located in $tokenInfo['email'];
For some reason VK giving user's email in the token response.