PHPackages                             loveteemo/qqconnect - 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. loveteemo/qqconnect

ActiveLibrary

loveteemo/qqconnect
===================

thinkphp 5 &amp; qqconnect

1.2(9y ago)144052PHPPHP &gt;=5.4.0

Since Oct 25Pushed 9y ago2 watchersCompare

[ Source](https://github.com/loveteemo/qqconnect)[ Packagist](https://packagist.org/packages/loveteemo/qqconnect)[ RSS](/packages/loveteemo-qqconnect/feed)WikiDiscussions master Synced today

READMEChangelog (1)DependenciesVersions (4)Used By (0)

ThinkPHP 5 &amp; Oauth2.0 QQ登录
==============================

[](#thinkphp-5--oauth20-qq登录)

类库是基于Oauth2.0结合ThinkPHP 5 修改部分内容，仅适配 ThinkPhP 5

个人博客主页：

安装方法
----

[](#安装方法)

composer安装:

```
composer require loveteemo/qqconnect
```

添加公共配置:

```
// QQ 互联配置 在config.php中添加
'qqconnect' => [
    'appid' => '',
    'appkey' => '',
    'callback' => '',
    'scope' => 'get_user_info',
    'errorReport' => true
]
```

示例
--

[](#示例)

### 页面编写:

[](#页面编写)

```
QQ登录

```

### 控制器编写:

[](#控制器编写)

登录

```
namespace app\index\controller;
use loveteemo\qqconnect\QC;
class Base
{
    public function qqlogin()
    {
        $qc = new QC();
        return redirect($qc->qq_login());
    }
}
```

回调

```
namespace app\index\controller;
use loveteemo\qqconnect\QC;
class Base
{
    public function callback()
    {
        $Qc = new QC();
        $access_token =  $Qc->qq_callback();
        $openid = $Qc->get_openid();
        $Qc = new QC($access_token,$openid);
        $qq_user_info = $Qc->get_user_info();
        //打印数据
        //dump($qq_user_info);die;
        // ...
        // 用户逻辑
        return redirect(url('Index/index'));
    }
}
```

获取到的QQ数据

```
array(18) {
    ["ret"] => int(0)
    ["msg"] => string(0) ""
    ["is_lost"] => int(0)
    ["nickname"] => string(21) "那年，烟雨重楼"
    ["gender"] => string(3) "男"
    ["province"] => string(6) "广东"
    ["city"] => string(6) "深圳"
    ["year"] => string(4) "1993"
    ["figureurl"] => string(73) "http://qzapp.qlogo.cn/qzapp/101232670/7C8F797F30B08554A6E39A537F9A324B/30"
    ["figureurl_1"] => string(73) "http://qzapp.qlogo.cn/qzapp/101232670/7C8F797F30B08554A6E39A537F9A324B/50"
    ["figureurl_2"] => string(74) "http://qzapp.qlogo.cn/qzapp/101232670/7C8F797F30B08554A6E39A537F9A324B/100"
    ["figureurl_qq_1"] => string(69) "http://q.qlogo.cn/qqapp/101232670/7C8F797F30B08554A6E39A537F9A324B/40"
    ["figureurl_qq_2"] => string(70) "http://q.qlogo.cn/qqapp/101232670/7C8F797F30B08554A6E39A537F9A324B/100"
    ["is_yellow_vip"] => string(1) "0"
    ["vip"] => string(1) "0"
    ["yellow_vip_level"] => string(1) "0"
    ["level"] => string(1) "0"
    ["is_yellow_year_vip"] => string(1) "0"
}
```

###  Health Score

31

—

LowBetter than 71% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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

3

Last Release

3434d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/65acd18bc9029fee9668513ac95294444678f0fd01fe32197399eb667d8f9d6e?d=identicon)[loveteemo](/maintainers/loveteemo)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/loveteemo-qqconnect/health.svg)

```
[![Health](https://phpackages.com/badges/loveteemo-qqconnect/health.svg)](https://phpackages.com/packages/loveteemo-qqconnect)
```

PHPackages © 2026

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