src/thinkextend/oauth/Driver.php
public function getAccessToken($code)
    {
        $params = [
            'client_id'     => $this->appKey,
            'client_secret' => $this->appSecret,
            'grant_type'    => $this->grantType,
            'redirect_uri'  => $this->callback,
            'code'          => $code,
        ];
        // 获取token信息
        $data = $this->http($this->getAccessTokenURL, $params, 'POST');
        // 解析token
        $this->token = $this->parseToken($data);
        return $this->token;
    }
public function getAccessToken($code)
    {
        $params = [
            'client_id'     => $this->appKey,
            'client_secret' => $this->appSecret,
            'grant_type'    => $this->grantType,
            'redirect_uri'  => $this->callback,
            'code'          => $code,
        ];
        // 获取token信息
        $data = $this->http($this->getAccessTokenURL, $params, 'POST');
        // 解析token
        $this->token = $this->parseToken($data);
        return $this->token;
    }
获取access_token
@param string $code 授权登录成功后得到的code信息