All Projects → corbanb → freebird-php

corbanb / freebird-php

Licence: MIT License
Twitter application only auth package for composer.

Programming Languages

PHP
23972 projects - #3 most used programming language
ApacheConf
554 projects

Freebird - Twitter App Only Auth

Welcome

Freebird is a simple library designed to make connecting to Twitter's API as simple as possible on the server. Freebird was written to make life as easy as possible on developers to connect thier application servers to Twitter's API. Freebird uses the Application Only Authentication methodology, to find out more on this you can view the docs here from the offical Twitter API website.

Installing via Composer

The recomended way to install Freebird is through Composer.

# Install Composer
curl -sS https://getcomposer.org/installer | php

# Add Freebird as a dependency
php composer.phar require corbanb/freebird-php:~0.2.4

After installing, you need to require Composer's autoloader:

require 'vendor/autoload.php';

Freebird Dependencies

"php": ">=5.3.0"
"guzzle/guzzle": "3.1.*"

Basic Usage

Once installed you can easily access all of the Twitter API endpoints supported by Application Only Authentication. You can view those enpoints here.

<?php

// Setup freebird Client with Twitter application keys
$client = new Freebird\Services\freebird\Client();

// init bearer token
$client->init_bearer_token('your_key', 'your_secret_key');

// optional set bearer token if already aquired
// $client->set_bearer_token('your_bearer_token');

// Request API enpoint data
$response = $client->api_request('favorites/list.json', array('screen_name' => 'corbanb'));

// return api data
echo $response;

Unit Testing

Not complete. Please feel free to fork and submit pull requests to help contribute to Freebird. Thanks.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].