mp-php/fuel-packages-bitly

dev-master 2013-05-04 07:46 UTC

This package is auto-updated.

Last update: 2024-03-19 19:19:41 UTC


README

Install

Setup to fuel/packages/bitly

Usage

1: Configuration

  1. Get login & apikey http://bitly.com/a/your_api_key
  2. Copy packages/bitly/config/bitly.php to under app/config directory.
  3. Edit bitly.php that copied.

2: Enable bitly package.

In app/config/config.php
'always_load' => array('packages' => array(
	'bitly',
	...

or

In your code
Package::load('bitly');

Supported API

/v3/expand

Bitly::expand('http://bit.ly/MiCtW6'); // 'http://google.com/'

/v3/shorten

Bitly::shorten('http://google.com/') // 'http://bit.ly/MiCtW6'