PHPackages                             makotokw/twient - 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. makotokw/twient

ActiveLibrary[API Development](/categories/api)

makotokw/twient
===============

Twitter Client for PHP 5.3+

v0.7(8y ago)2632.0k↓50%1MITPHPPHP &gt;=5.3.0

Since Jan 16Pushed 8y ago1 watchersCompare

[ Source](https://github.com/makotokw/php-twient)[ Packagist](https://packagist.org/packages/makotokw/twient)[ Docs](http://github.com/makotokw/php-twient)[ RSS](/packages/makotokw-twient/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

php-twient
==========

[](#php-twient)

php-twient is a php5.3+ twitter client library and Composer package.

FEATURES
========

[](#features)

- Composer package
- Use namespace for PHP 5.3+
- Support Twitter API v1.1
- Should work with/without php\_curl (detects php\_curl automatically)

Usage
=====

[](#usage)

Install by using Composer
-------------------------

[](#install-by-using-composer)

Composer:

create blew composer.json on your project directory and execute `composer install`

```
/path/to/project/composer.json
{
    "require": {
        "makotokw/twient": "dev-master"
    }
}

```

Get timeline
------------

[](#get-timeline)

```

```

Post status (Tweet)
-------------------

[](#post-status-tweet)

```
$twitter->call('statuses/update', array('status' => 'tweet by php-twient'));

```

Using Streaming API with closure
--------------------------------

[](#using-streaming-api-with-closure)

The streaming method is terminated when callback returns false.

```
$twitter->streaming(
    'statuses/filter',
    array('track' => 'Sushi,Japan'),
    function ($twitter, $status) {
        static $count = 0;
        echo $status['user']['name'] . ':' . $status['text'] . PHP_EOL;
        return ($count++ < 5);
    }
);

```

Alternative API
---------------

[](#alternative-api)

```
use Makotokw\Twient\Twitter\V1dot1 as Twitter;

$twitter = new Twitter();
...
$twitter->statusesHomeTimeline();       // instead of "call('statuses/home_timeline')"
$twitter->statusesUpdate(...);          // instead of "call('statuses/update', ...)"
$twitter->streamingStatusesFilter(...);    // instead of "streaming('statuses/filter', ...)"

```

HISTORY
=======

[](#history)

v0.7
----

[](#v07)

- Supported media/upload api

v0.6
----

[](#v06)

- Added vendor namespace `Makotokw\Twient`
- No longer supported TinyURL
- PSR-4 Auto Loading

v0.5.1
------

[](#v051)

- Used https scheme for Streaming API

v0.5
----

[](#v05)

- Supported Twitter API v1.1

v0.4
----

[](#v04)

- Updated to Composer package
- Required PHP5.3+
- PSR-2 Coding Standard

v0.3.1
------

[](#v031)

- Uses the Services\_JSON instead of json\_decode when PHP &lt; 5.2.0

v0.3
----

[](#v03)

- Fixed that OAuth part have deprecated function on PHP 5.3 or later
- Supported Trends Methods
- Updated Status Methods and User Methods

v0.2
----

[](#v02)

- Supported Search API.
- Supported User, Friendship and Social Graph Methods of REST API.
- Supported Streaming API.
- Changed call method returns associative arrays instead of objects.
- Added assoc flag to return associative arrays or objects.

v0.1
----

[](#v01)

- Initial Release

LICENSE
=======

[](#license)

The MIT License (MIT)
See also LICENSE file

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98% 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 ~411 days

Total

5

Last Release

3225d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b11136deeff255f3e82db25342678c5c5c3d37832be96408b2e4aa4dc24f4ed3?d=identicon)[makotokw](/maintainers/makotokw)

---

Top Contributors

[![makotokw](https://avatars.githubusercontent.com/u/53834?v=4)](https://github.com/makotokw "makotokw (50 commits)")[![ishinao](https://avatars.githubusercontent.com/u/74993?v=4)](https://github.com/ishinao "ishinao (1 commits)")

---

Tags

apitwitter

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/makotokw-twient/health.svg)

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

###  Alternatives

[jublonet/codebird-php

Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.

770865.9k10](/packages/jublonet-codebird-php)[fennb/phirehose

A PHP interface to the Twitter Streaming API.

698402.4k3](/packages/fennb-phirehose)[noweh/twitter-api-v2-php

This library provides methods for sending messages to Twitter and receiving statuses.

131225.2k1](/packages/noweh-twitter-api-v2-php)[redwebcreation/twitter-stream-api

Consume the Twitter Stream API in real-time.

3220.3k1](/packages/redwebcreation-twitter-stream-api)[corbanb/freebird-php

Twitter API v1.1 Application only authoization library

148.6k](/packages/corbanb-freebird-php)

PHPackages © 2026

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