metanet/php-twitter-api

PHP library to make usage of the twitter API more easy

v1.0.3 2015-08-21 05:09 UTC

This package is not auto-updated.

Last update: 2022-04-02 03:41:13 UTC


README

This is a simple PHP wrapper for the twitter API (version 1.1).

This is a fork of the twitter-api-php from J7mbo.

It simplifies the whole API requesting thing a bit.

Example

try {
	$twitterApi = new ch\metanet\twitter\api\TwitterAPI('access_token', 'access_token_secret', 'consumer_key', 'consumer_key_secret');
	
	$twitterApi->performRequest('statuses/update', TwitterAPI::REQUEST_METHOD_POST, array(
		'status' => 'foo bar baz'
	));
} catch(Exception $e) {
	echo 'ERROR during API call: ' , $e->getMessage() , ' (Code: ' , $e->getCode() , ')';
}