2017 © Pedro Peláez
 

library php-twit-api

PHP Library for interacting with Twitter API v1.1

image

digia/php-twit-api

PHP Library for interacting with Twitter API v1.1

  • Monday, April 20, 2015
  • by digia
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

PHP-Twit-API

An modern and elegant PHP Library for Twitter API v1.1 with OAuth., (*1)

Work in progress! TODO: - Clean up - Finish writing tests, (*2)

Features

  • Composer
  • Namespace
  • Chaining

Quick Example

<?php 
    $twitter = (new ApiFactory(array(
        'consumer_key' => '...',
        'consumer_secret' => '...',
        'oauth_token' => '...',
        'oauth_token_secret' => '...',
        )))->make();

    /**
     * Example: GET request with param chaining
     */
    $response = $twitter->get('statuses/user_timeline')
                ->param('screen_name', 'mooredigia')
                ->param('count', 10)
                ->send();

    var_dump(json_decode($response));

    /**
     * Example: GET with associative array params 
     */
    $params = [
        'screen_name' => 'mooredigia',
        'count' => 10,
        ];
    $response = $twitter->get('statuses/user_timeline')
                ->params($params)
                ->send();

    var_dump(json_decode($response));

    /**
     * Post requests are just as simple...
     */
    $response = $twitter->post('statuses/user_timeline')
                ->param('screen_name', 'mooredigia', 'POST')
                ->param('count', 10, 'POST')
                ->send();

    var_dump(json_decode($response));

REQUIREMENTS

  • PHP VERSION >= 5.4
  • PHP CURL

The Versions

20/04 2015

dev-master

9999999-dev https://github.com/digia

PHP Library for interacting with Twitter API v1.1

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-curl *

 

oauth twitter twitter api api v1.1 php twit api php twitter

20/04 2015

dev-develop

dev-develop https://github.com/digia

PHP Library for interacting with Twitter API v1.1

  Sources   Download

MIT

The Requires

  • php >=5.4
  • ext-curl *

 

oauth twitter twitter api api v1.1 php twit api php twitter