zenapply / php-bitly
4.0.0
2017-04-20 00:20 UTC
Requires
- php: ^5.5.9|^7.0
- guzzlehttp/guzzle: ^6.0
Requires (Dev)
- phpunit/phpunit: ^4.8|^5.0
README
版本3现在使用Bitly要求的OAuth2。 在此获取您的开发者访问令牌
安装
通过composer安装 - 在终端中
composer require leadthread/php-bitly
用法
use LeadThread\Bitly\Bitly; $c = new Bitly("access token"); $result = $c->shorten("https://www.google.com/"); var_dump($result); // string(21) "http://bit.ly/1SvUIo8"