PHPackages                             maalls/twitterapi - 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. maalls/twitterapi

ActiveLibrary[API Development](/categories/api)

maalls/twitterapi
=================

Implementation of the Twitter API for PHP.

v1.2.5(8y ago)061MITPHP

Since Oct 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/maalls/TwitterApi)[ Packagist](https://packagist.org/packages/maalls/twitterapi)[ Docs](https://github.com/maalls/twitterapi)[ RSS](/packages/maalls-twitterapi/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

TwitterApi
==========

[](#twitterapi)

Simple Twitter API using OAuth 1.1, in PHP.

\#Installation using Composer

Add the following line into the require section of your composer.json:

```
  "require": {
    "maalls/TwitterApi": "~1.0"
  }
```

Then run the following command line:

```
$composer update
```

\#Examples

```
use Maalls\TwitterApi;

// A get request.
$api = new TwitterApi($access_token, $access_token_secret, $consumer_key, $consumer_secret);
$json = $api->get('search/tweets', array('q' => "github"));

// A post request.
$json = $api->>post("statuses/update", array("status" => "I love coding."));

// iterate() works for actions that returns an array of tweets: it collects all the tweets available by making several HTTP request and adjusting max_id parameters.
// see https://dev.twitter.com/rest/public/timelines
$json = $api->iterate('twitter/search', array('q' => 'githun'));
```

The class also collect the HTTP response header into an array, this is useful because it includes rate limit information:

```
var_dump($api->header);

array(17) {
  [...]
  'x-rate-limit-limit' =>
  string(3) "180"
  'x-rate-limit-remaining' =>
  string(3) "179"
  'x-rate-limit-reset' =>
  string(10) "1416472112"
  [...]
}
```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~174 days

Recently: every ~299 days

Total

8

Last Release

3000d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1229999?v=4)[Malo](/maintainers/maalls)[@maalls](https://github.com/maalls)

---

Top Contributors

[![maalls](https://avatars.githubusercontent.com/u/1229999?v=4)](https://github.com/maalls "maalls (30 commits)")

---

Tags

phpapitwitter

### Embed Badge

![Health badge](/badges/maalls-twitterapi/health.svg)

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

###  Alternatives

[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)[owlycode/streaming-bird

A PHP client for the Twitter Streaming APIs inspired from Phirehose.

1024.6k](/packages/owlycode-streaming-bird)

PHPackages © 2026

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