protected parseToken ( string $result ) | ||
$result | string | 获取access_token的方法的返回值 |
protected function parseToken($result)
{
parse_str($result, $data);
if ($data['access_token'] && $data['expires_in']) {
$data['openid'] = $this->getOpenId();
return $data;
} else {
throw new \Exception("获取腾讯QQ ACCESS_TOKEN 出错:{$result}");
}
}