2017 © Pedro Peláez
 

library bitly-shortening-class

A simple class to shorten links using Bitly API

image

kristobaljunta/bitly-shortening-class

A simple class to shorten links using Bitly API

  • Thursday, April 14, 2016
  • by kristobaljunta
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

bitly-shortening-class

Bitly shortening class, (*1)

Simple class for shortening links using bit.ly; provides only link shortening, (*2)

Usage

Create a Bitly class object and pass an access token to it (you can use generic oauth token for that) like so:, (*3)

use KristobalJunta\Bitly;

$accessToken = 'your-access-token';

$bitly = new Bitly([
    'access_token' => $accessToken
]);

You can also choose response format (either text, json or xml). Default is json:, (*4)

$bitly = new Bitly([
    'access_token' => $accessToken,
    'response_type' => 'text'
]);

Finally, use the shorten method:, (*5)

$shortenedUrl = $bitly->shorten('http://example.com');

The Versions

14/04 2016

dev-master

9999999-dev

A simple class to shorten links using Bitly API

  Sources   Download

WTFPL

The Requires

  • php >=5.3.0

 

by Kristobal

14/04 2016

1.0

1.0.0.0

A simple class to shorten links using Bitly API

  Sources   Download

WTFPL

The Requires

  • php >=5.3.0

 

by Kristobal