atans / yii2-weibo-shorturl
Weibo short url client
Package info
github.com/atans/yii2-weibo-shorturl
Type:yii2-extension
pkg:composer/atans/yii2-weibo-shorturl
dev-master
2017-01-01 13:40 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2026-02-14 02:52:36 UTC
README
Weibo short url client
Installation
The preferred way to install this extension is through composer.
Either run
composer require atans/yii2-weibo-shorturl
or add
"atans/yii2-weibo-shorturl": "*"
to the require section of your composer.json file.
Usage
// app/config/main-local.php use atans\weibo\ShortUrl; return [ 'components' => [ // ... 'shortUrl' => [ 'class' => ShortUrl::className(), 'appKey' => '<your-app-key>', ], ], ]; // Use it $response = Yii::$app->shortUrl->shorten('http://www.yiiframework.com');