Skip to content

nticaric/twitter-streaming-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitter-streaming-api

A PHP library for consuming Twitter’s Streaming API

##Instalation

The easiest way to install Twitter Streaming API is via composer. Create the following composer.json file and run the php composer.phar install command to install it.

{
    "require": {
        "nticaric/twitter-streaming-api": "dev-master"
    }
}

##Examples

POST statuses/filter

Returns public statuses that match one or more filter predicates

Usage:

	use Nticaric\Twitter\TwitterStream;

	$stream = new TwitterStream(array(
	    'consumer_key'    => 'my_consumer_key',
	    'consumer_secret' => 'my_consumer_secret',
	    'token'           => 'my_token',
	    'token_secret'    => 'my_token_secret'
	));

	$res = $stream->getStatuses(['track' => 'car'], function($tweet) {
		//prints to the screen statuses as they come along
		print_r($tweet);
	});

About

A PHP library for consuming Twitter’s Streaming API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages