定制 gabrielkaputa/bitly 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

gabrielkaputa/bitly

最新稳定版本:1.0.2

Composer 安装命令:

composer require gabrielkaputa/bitly

包简介

PHP library to consume bit.ly API

README 文档

README

Build Status Latest Stable Version

PHP library to consume bit.ly API

Installation

The recommended way to install this library is through Composer.

composer require gabrielkaputa/bitly

Usage

First of all, create a bit.ly account if you don't have one already.

If all you need to do is to create shortlinks on behalf of a single user or site, all you need is to get your generic access token. When done, you can create shortlinks like this:

require_once("vendor/autoload.php");

$bitly = \GabrielKaputa\Bitly::withGenericAccessToken(GENERIC_ACCESS_TOKEN);
$short_url = $bitly->shortenUrl($long_url);

Another option is when you are working with multiple end-users or to pull any information on a user level for your own account. In this case you will need to register your application to get your CLIENT_ID and CLIENT_SECRET. When done, you can create shortlinks like this:

require_once("vendor/autoload.php");

$bitly = \GabrielKaputa\Bitly::withCredentials(CLIENT_ID, CLIENT_SECRET, USERNAME, PASSWORD);
$short_url = $bitly->shortenUrl($long_url);

统计信息

  • 总下载量: 71.69k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2016-04-12