Beispiel #1
0
 public function getAccessToken($code, $params = array())
 {
     $params['state'] = md5(session_id());
     $params['scope'] = 'email';
     $resp = parent::getAccessToken($code, $params);
     parse_str($resp['result'], $info);
     return $info['access_token'];
 }
Beispiel #2
0
 public function getAccessToken($code, $params = array())
 {
     $params['grant_type'] = 'authorization_code';
     $resp = parent::getAccessToken($code, $params);
     return $resp['result']['access_token'];
 }