fuel-package fuel-packages-bitly
mp-php/fuel-packages-bitly
- Saturday, May 4, 2013
- by mamor
- Repository
- 2 Watchers
- 0 Stars
- 11 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
FuelPHP Package for bitly
Install
Setup to fuel/packages/bitly
- Use composer https://packagist.org/packages/mp-php/fuel-packages-bitly
- git submodule add
- Download zip
Usage
1: Configuration
- Get login & apikey http://bitly.com/a/your_api_key
- Copy packages/bitly/config/bitly.php to under app/config directory.
- Edit bitly.php that copied.
2: Enable bitly package.
In app/config/config.php
'always_load' => array('packages' => array(
'bitly',
...
or, (*1)
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'