PHP code example of corbanb / freebird-php

1. Go to this page and download the library: Download corbanb/freebird-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

corbanb / freebird-php example snippets




// 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;

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

# Add Freebird as a dependency
php composer.phar 



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