PHPackages                             wp-pure/twitter-aggregator - 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. wp-pure/twitter-aggregator

ActiveLibrary

wp-pure/twitter-aggregator
==========================

A Twitter aggregator to aggregate multiple twitter accounts into a single lising. Includes caching - originally intended to work with WordPress - but will also work with any PHP application.

1.1.0(6y ago)11131MITPHP

Since May 11Pushed 6y ago1 watchersCompare

[ Source](https://github.com/wp-pure/twitter-aggregator)[ Packagist](https://packagist.org/packages/wp-pure/twitter-aggregator)[ RSS](/packages/wp-pure-twitter-aggregator/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (1)Versions (14)Used By (1)

php-twitter-aggregator
----------------------

[](#php-twitter-aggregator)

This script uses the [twitter-api-php](https://github.com/J7mbo/twitter-api-php) library to retrieve twitter feeds, aggregate them and cache them. If included in a WordPress theme or plugin, it'll find the WP functions, and the cache folder will be put into the uploads folder. Enough ado, here's a sample integration.

[![Github](https://camo.githubusercontent.com/d9fd9f85e80186374589edad1440594e40a7d2d1b8fdba64d915f75ebfd706cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a7065646572736f6e2f7068702d747769747465722d61676772656761746f722e737667)](https://camo.githubusercontent.com/d9fd9f85e80186374589edad1440594e40a7d2d1b8fdba64d915f75ebfd706cc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6a7065646572736f6e2f7068702d747769747465722d61676772656761746f722e737667) [![MIT](https://camo.githubusercontent.com/874aa06a576e848c6f1050b996128328b6bf4fe5daeae399e38b3006fadd84a2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a7065646572736f6e2f7068702d747769747465722d61676772656761746f722e737667)](https://camo.githubusercontent.com/874aa06a576e848c6f1050b996128328b6bf4fe5daeae399e38b3006fadd84a2/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6a7065646572736f6e2f7068702d747769747465722d61676772656761746f722e737667)

---

### Install via Composer

[](#install-via-composer)

```
composer require wp-pure/twitter-aggregator
```

Include composer's autoloader:

```
require_once 'vendor/autoload.php';
```

---

### Obtain Twitter API Keys

[](#obtain-twitter-api-keys)

Check out the URL below to create a Twitter app and get your keys to use their API.

---

### Code Examples

[](#code-examples)

#### Instantiate

[](#instantiate)

```
// generate an aggregator object
$ta = new twitterAggregator( array(

	// twitter API consumer key, secret, and oath token and oauth secret
    'consumer_key' => "[CONSUMER KEY]",
    'consumer_secret' => "[CONSUMER SECRET]",
    'oauth_access_token' => "[OAUTH ACCESS TOKEN]",
    'oauth_access_token_secret' => "[OAUTH ACCESS TOKEN SECRET]",

    // comma separated list of twitter handles to pull
    'usernames' => "[TWITTER USERNAMES]",

    // set the number of tweets to show
    'count' => 10,

	// set an update interval (minutes)
    'update_interval' => 10,

    // set the cache directory name/path
    'cache_dir' => 'cache',

    // boolean, exclude replies, default true
    'exclude_replies' => true,

    // boolean, include retweets, default true
    'include_rts' => true

) );
```

#### Methods:

[](#methods)

There are multiple ways to use the aggregator once it's instantiated. You can display it, with or without styles, or retrieve the widget code.

```
// display the widget
$ta->display();

// display the widget without any styles
$ta->display_unstyled();

// fetch the widget code
$code = $ta->widget();

// fetch data
$data = $ta->fetch();
```

If you'd like to directly access the api response data (not limited by the `count` option), use the `$ta->data` property after the aggregator object is instantiated.

---

Developed by [James Pederson](https://jpederson.com).

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

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 ~1 days

Total

13

Last Release

2548d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/34996501f340088efc05859461b1c4e59562f3cf345c7958080fca169375e825?d=identicon)[jpederson](/maintainers/jpederson)

---

Top Contributors

[![jpederson](https://avatars.githubusercontent.com/u/400527?v=4)](https://github.com/jpederson "jpederson (61 commits)")

### Embed Badge

![Health badge](/badges/wp-pure-twitter-aggregator/health.svg)

```
[![Health](https://phpackages.com/badges/wp-pure-twitter-aggregator/health.svg)](https://phpackages.com/packages/wp-pure-twitter-aggregator)
```

PHPackages © 2026

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