PHPackages                             woshixieming/qq-oauth2.0 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. woshixieming/qq-oauth2.0

ActiveLibrary

woshixieming/qq-oauth2.0
========================

QQ Oauth2.0

v1.0.1(8y ago)123MITPHPPHP &gt;=5.4.0

Since Jul 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/woshixieming/qq-oauth2.0)[ Packagist](https://packagist.org/packages/woshixieming/qq-oauth2.0)[ Docs](https://github.com/woshixieming)[ RSS](/packages/woshixieming-qq-oauth20/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

qq-oauth2.0
===========

[](#qq-oauth20)

**QQ登录OAuth2.0总体处理流程如下：**

> Step1：申请接入，获取appid和apikey；
> Step2：开发应用，并设置协作者帐号进行测试联调；
> Step3：放置QQ登录按钮；
> Step4：通过用户登录验证和授权，获取Access Token；
> Step5：通过Access Token获取用户的OpenID；
> Step6：调用OpenAPI，来请求访问或修改用户授权的资源。

**全局参数配置**

```
'qq_oauth_config' => [
    'appid' => '',
    'appkey' => '',
    'callback' => '',
    'scope' => 'get_user_info',
    'errorReport' => true
]

```

**修改Recorder.php的参数配置:**

```
public function __construct(){
    $this->error = new ErrorCase();

    //-------读取配置文件
    $this->inc = config('qq_oauth_config');
    if(empty($this->inc)){
        $this->error->showError("20001");
    }

    if(empty(session('QC_userData'))){
        self::$data = array();
    }else{
        self::$data = session('QC_userData');
    }
}

```

**调用:**

1、获取授权地址:

```
$qq=new qqClinet();
$url=$qq->qq_login();
header('Location:'.$url);

```

2、获取Access Token和OpenID

```
$qq=new qqClinet();
//用户授权后,获取access_token
$accessToken=$qq->qq_callback();
$openId=$qq->get_openid();

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3224d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bcc22f562cedcd7125e46b07f62eae27530748b2d700f6da26519d68c6977c8?d=identicon)[tianyuan4021](/maintainers/tianyuan4021)

---

Top Contributors

[![woshixieming](https://avatars.githubusercontent.com/u/15795232?v=4)](https://github.com/woshixieming "woshixieming (4 commits)")

---

Tags

qq-oauthwoshixieming

### Embed Badge

![Health badge](/badges/woshixieming-qq-oauth20/health.svg)

```
[![Health](https://phpackages.com/badges/woshixieming-qq-oauth20/health.svg)](https://phpackages.com/packages/woshixieming-qq-oauth20)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
