PHPackages                             ktamashun/callisto - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ktamashun/callisto

ActiveLibrary[API Development](/categories/api)

ktamashun/callisto
==================

PHP library for the Twitter Streaming API

v0.2(9y ago)231MITPHPPHP 7.1.\*

Since Feb 3Pushed 1y ago2 watchersCompare

[ Source](https://github.com/ktamashun/callisto)[ Packagist](https://packagist.org/packages/ktamashun/callisto)[ RSS](/packages/ktamashun-callisto/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (3)Dependencies (3)Versions (5)Used By (0)

Callisto
========

[](#callisto)

[![Latest Version on Packagist](https://camo.githubusercontent.com/09fb798761eb573c8cd3483518fe07f78bae6a5ae2862d953bbe012d49379df9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b74616d617368756e2f63616c6c6973746f2e737667)](https://packagist.org/packages/ktamashun/callisto)[![Software License](https://camo.githubusercontent.com/074b89bca64d3edc93a1db6c7e3b1636b874540ba91d66367c0e5e354c56d0ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e737667)](LICENSE.md)[![Coverage Status](https://camo.githubusercontent.com/0ed582d64449cee9b05d726a82d88f9f49fba42f9cd89a127cc814bbb6acafb5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6b74616d617368756e2f63616c6c6973746f2e737667)](https://scrutinizer-ci.com/g/ktamashun/callisto/code-structure)[![Quality Score](https://camo.githubusercontent.com/5140dcda951639c79cf25399a77188b357d15f79adb3b315139f5a4564158109/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b74616d617368756e2f63616c6c6973746f2e737667)](https://scrutinizer-ci.com/g/ktamashun/callisto)[![Build Status](https://camo.githubusercontent.com/c25be8444a94aaeb45c239c0d399a7d91de43b11fe609f4ab07e611572683796/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6b74616d617368756e2f63616c6c6973746f2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ktamashun/callisto/build-status/master)[![Total Downloads](https://camo.githubusercontent.com/96b03ece257ee4d8d7ee158fd72f58c983134b3d97e4b5fa88f55f52e9a60447/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b74616d617368756e2f63616c6c6973746f2e737667)](https://packagist.org/packages/ktamashun/callisto)

**PHP library for Twitter Streaming API.**

Twitteer Streaming API documentation:

Install
-------

[](#install)

The esiest way to install Callisto is using composer

`$ composer require ktamashun/callisto`

Usage
-----

[](#usage)

### Create a Twitter app

[](#create-a-twitter-app)

First go to  and create a new Twitter app. To authenticate to the Twitter Streaming API you will need a `CONSUMER_KEY`, `CONSUMER_SECRET`, `ACCESS_TOKEN` and an `ACCESS_TOKEN_SECRET`. These can be found on the Keys and access tokens tab within your application.

### Running the examples

[](#running-the-examples)

The examples can be found in the `examples` directory.

The directory contains a sample config file: `env.sample.php`. Use this to create a local one called `env.local.php` and fill in the `CONSUMER_KEY`, `CONSUMER_SECRET`, `ACCESS_TOKEN` and `ACCESS_TOKEN_SECRET` constants with the ones from your application.

The esiest way to run the examples is to use a [Docker](https://www.docker.com/) container. Run this command from the project's root directory:

`$ docker run -it --rm -v $(pwd):/www/ -w /www/examples php:7.1-alpine php filter_example.php`

### Using the filter stream

[](#using-the-filter-stream)

There are five type of filters in the `\Callisto\RequestParameters` namespace.

- `FilterLevel`: This can be used to filter out tweets that for example would not be appropriate during a presentation.
- `Follow`: You can use this parameter follow the activity of certain users.
- `Language`: Filter tweets that were written in one or more given languages.
- `Location`: Filter tweets that were written in a certain geographic area. Please read carefully Twitter's documentation about location filtering.
- `Track`: You can track specific words.

You can read about fiiter parameters in detail in the [Twitter API documentation](https://dev.twitter.com/streaming/overview/request-parameters).

Example usage:

```
$oauth = new \Callisto\Oauth(CONSUMER_KEY, CONSUMER_SECRET, ACCESS_TOKEN, ACCESS_TOKEN_SECRET);
$stream = new \Callisto\Stream\Filter($oauth);
$stream->setRequestParameters(
	[
		// Track custom phrases
		new Callisto\RequestParameter\Track(['twitter']),
		// Filter Tweets by language
		new Callisto\RequestParameter\Language(['en', 'de']),
		// Filter tweets from New York or San Francisco
		new Callisto\RequestParameter\Location(
			[
				[-74, 40, -73, 41],
				[-122.75, 36.8, -121.75, 37.8],
			]
		),
		// Follow specific users
		new Callisto\RequestParameter\Follow(['123456789', '987654321']),
		// Set filter level for the stream
		new Callisto\RequestParameter\FilterLevel(Callisto\RequestParameter\FilterLevel::LOW)
	]
);

foreach ($stream->readStream() as $jsonStatus) {
	echo $jsonStatus;
}
```

Versioning
----------

[](#versioning)

This library follows [SemVer v2.0.0.](http://semver.org/)

Testing
-------

[](#testing)

The library is tested using PHPUnit. You can run the test like:

`$ ./vendor/phpunit/phpunit ./tests`

Credits
-------

[](#credits)

[Tamás Kovács](https://github.com/ktamashun)

Licence
-------

[](#licence)

The MIT License (MIT). Please see the License File for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~4 days

Total

3

Last Release

3424d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1775740?v=4)[Tamás Kovács](/maintainers/ktamashun)[@ktamashun](https://github.com/ktamashun)

---

Top Contributors

[![ktamashun](https://avatars.githubusercontent.com/u/1775740?v=4)](https://github.com/ktamashun "ktamashun (54 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

php-librarystream-apistream-processingtwittertwitter-streaming-api

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ktamashun-callisto/health.svg)

```
[![Health](https://phpackages.com/badges/ktamashun-callisto/health.svg)](https://phpackages.com/packages/ktamashun-callisto)
```

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k86.9M2.2k](/packages/symfony-symfony)[algolia/algoliasearch-client-php

API powering the features of Algolia.

69734.4M144](/packages/algolia-algoliasearch-client-php)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M712](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.7k371.6k6](/packages/theodo-group-llphant)[telnyx/telnyx-php

Official Telnyx PHP SDK — APIs for Voice, SMS, MMS, WhatsApp, Fax, SIP Trunking, Wireless IoT, Call Control, and more. Build global communications on Telnyx's private carrier-grade network.

35729.6k2](/packages/telnyx-telnyx-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
