Giter VIP home page Giter VIP logo

freebird-php's Introduction

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.2

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.

freebird-php's People

Contributors

corbanb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.