PHPackages                             belinchung/libweibo - 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. [API Development](/categories/api)
4. /
5. belinchung/libweibo

ActiveLibrary[API Development](/categories/api)

belinchung/libweibo
===================

PHP sdk for Weibo open platform

091PHP

Since Jul 7Pushed 8y ago1 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

=================

用于新浪微博开放平台的PHP SDK. 内含能直接使用的DEMO.

SAE(Sina App Engine,  )已内置SDK，不需要下载，使用前需要手工调用 require\_once('saetv2.ex.class.php');

composer
--------

[](#composer)

composer.phar require xiaosier/libweibo:dev-master

更新
--

[](#更新)

- 2013年2月20日 修改V2版一处notice
- 2011年12月16日 修改V2版两处手误
- 2011年10月21日 发布V2版PHP SDK，基于 [http://open.weibo.com/wiki/API%E6%96%87%E6%A1%A3\_V2](http://open.weibo.com/wiki/API%E6%96%87%E6%A1%A3_V2) 中的最新接口封装。
- 2011年6月16日 发布OAuth2版PHP SDK，删除Basic认证的SDK（微博开放平台已不支持Basic认证）
- 2010年11月17日 修改了demo程序默认callback url在某些访问方式下不正确的问题.
- 2010年6月29日Basic认证版本&amp;OAuth版本添加verify\_credentials函数,用于获取当前用户信息,OAuth添加update\_avatar更新头像
- 2010年5月5日 Basic 认证版本添加图片发布支持
- 2010年5月12日 OAuth 认证版本添加图片支持

说明
--

[](#说明)

**Demo演示地址**

- V2版Demo:
- 站内应用Demo:
- OAuth版Demo:

**如何申请API Key**

你需要有一个新浪微博开放平台的API Key.这里申请:

**关于Class的功能**

- 基于OAuth认证.
- 完成至2011年10月21日止，全部接口的封装

**新浪微博V2版PHPSDK Demo使用教程**

- 1.在open.weibo.com创建应用，得到API KEY，设置“授权设置”中的“应用回调页”地址为"[http://host/callback.php"，其中host为网站域名。](http://host/callback.php%22%EF%BC%8C%E5%85%B6%E4%B8%ADhost%E4%B8%BA%E7%BD%91%E7%AB%99%E5%9F%9F%E5%90%8D%E3%80%82)
- 2.下载Demo,然后解压,修改config.php中的WB\_AKEY为App Key，WB\_SKEY为App Secret，WB\_CALLBACK\_URL为刚才填入的回调页地址。
- 3.上传到PHP空间即可

**新浪微博站内应用Demo使用教程**

- 1.在open.weibo.com创建站内应用，得到API KEY
- 2.编辑应用属性，设置"应用页面"中的“站内应用地址”
- 3.下载，解压，修改config.php中的WB\_AKEY为App Key，WB\_SKEY为App Secret，CANVAS\_PAGE为“应用页面”中设置的”站内应用地址“
- 4.上传代码到PHP空间
- 5.编辑应用属性，设置"应用页面"中的"应用实际地址"为刚刚上传代码的apps.php的地址，比如："[http://xxxxx.sinaapp.com/apps.php"，设置“Iframe高度“为2000px。](http://xxxxx.sinaapp.com/apps.php%22%EF%BC%8C%E8%AE%BE%E7%BD%AE%E2%80%9CIframe%E9%AB%98%E5%BA%A6%E2%80%9C%E4%B8%BA2000px%E3%80%82)
- 6.访问刚刚设置的“站内应用地址”即可。

**OAuth版Demo使用教程**

- 1.在open.weibo.com创建应用，得到API KEY
- 2.下载,然后解压,修改config.php中的WB\_AKEY为App Key，WB\_SKEY为App Secret。
- 3.上传到PHP空间即可

Bug tracker
-----------

[](#bug-tracker)

Have a bug? Please create an issue here on GitHub!

Authors
-------

[](#authors)

-
-

License
-------

[](#license)

Copyright 2011 SINA, Inc. Copyright 2011 SAE

Licensed under the Apache License, Version 2.0:

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

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

---

Top Contributors

[![xiaosier](https://avatars.githubusercontent.com/u/3271108?v=4)](https://github.com/xiaosier "xiaosier (4 commits)")[![BelinChung](https://avatars.githubusercontent.com/u/4954264?v=4)](https://github.com/BelinChung "BelinChung (3 commits)")[![custool](https://avatars.githubusercontent.com/u/3912290?v=4)](https://github.com/custool "custool (1 commits)")

### Embed Badge

![Health badge](/badges/belinchung-libweibo/health.svg)

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

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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