PHPackages                             spoonwep/oauth2-weibo - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. spoonwep/oauth2-weibo

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

spoonwep/oauth2-weibo
=====================

Weibo OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1.2.4(4y ago)2912[2 issues](https://github.com/spoonwep/oauth2-weibo/issues)MITPHPPHP &gt;=5.4.0

Since Jan 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/spoonwep/oauth2-weibo)[ Packagist](https://packagist.org/packages/spoonwep/oauth2-weibo)[ RSS](/packages/spoonwep-oauth2-weibo/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (8)Used By (0)

oauth2-weibo
============

[](#oauth2-weibo)

Weibo OAuth 2.0 support for the PHP League's OAuth 2.0 Client ##Install You can open a terminal and type in

```
composer require spoonwep/oauth2-weibo
```

or require in a composer.json

```
"require": {
	"spoonwep/oauth2-weibo": "^1.2"
}
```

then run:

```
composer update
```

\##Useage

```
session_start();
$provider = new \spoonwep\OAuth2\Client\Provider\Weibo([
	'clientId' => '{weibo App Key}',
	'clientSecret' => '{weibo App Secret}',
	'redirectUri' => '{http://example.com/callback-url}',
]);
if (!isset($_GET['code'])) {
	$authUrl = $provider->getAuthorizationUrl();
	$_SESSION['oauth2state'] = $provider->getState();
	header('Location: '.$authUrl);
	exit;
} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
	unset($_SESSION['oauth2state']);
	exit('Invalid state');
} else {
	$token = $provider->getAccessToken('authorization_code', [
		'code' => $_GET['code']
	]);

	//fetch userinfo returned by serverside
	$user = $provider->getResourceOwner($token);
	print_r($user->toArray());
}
```

\###License The MIT License (MIT). Please see [License](https://github.com/spoonwep/oauth2-weibo/blob/master/LICENSE.txt) File for more information.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity63

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 ~376 days

Recently: every ~516 days

Total

7

Last Release

1550d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1231454?v=4)[chengcheng](/maintainers/chengcheng)[@chengcheng](https://github.com/chengcheng)

---

Top Contributors

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

---

Tags

clientoauthoauth2authorizationauthorisationweibo

### Embed Badge

![Health badge](/badges/spoonwep-oauth2-weibo/health.svg)

```
[![Health](https://phpackages.com/badges/spoonwep-oauth2-weibo/health.svg)](https://phpackages.com/packages/spoonwep-oauth2-weibo)
```

###  Alternatives

[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2276.2M36](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1152.7M11](/packages/patrickbussmann-oauth2-apple)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36761.9k15](/packages/omines-oauth2-gitlab)[league/oauth2-instagram

Instagram OAuth 2.0 Client Provider for The PHP League OAuth2-Client

661.1M43](/packages/league-oauth2-instagram)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

261.8M1](/packages/mollie-oauth2-mollie-php)[dalpras/oauth2-gotowebinar

LogMeIn GoToWebinar OAuth 2.0 Client Provider for the PHP League's OAuth 2.0 Client

1245.5k](/packages/dalpras-oauth2-gotowebinar)

PHPackages © 2026

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