PHPackages                             joshmoody/twitter-consumer - 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. joshmoody/twitter-consumer

ActiveLibrary

joshmoody/twitter-consumer
==========================

Twitter Auth-Only API Consumer

09PHP

Since Feb 5Pushed 12y ago1 watchersCompare

[ Source](https://github.com/joshmoody/twitter-consumer)[ Packagist](https://packagist.org/packages/joshmoody/twitter-consumer)[ RSS](/packages/joshmoody-twitter-consumer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

README
======

[](#readme)

Twitter Consumer
----------------

[](#twitter-consumer)

As of the 1.1 version of the Twitter REST API, all requests require OAuth.

On 11-Mar-2013, Twitter released Application-only authentication to allow requests on behalf of an APPLICATION, as opposed to on behalf of a specific USER.

This library implements the new authentication for public resources like user timelines.

See  for more info.

Installation
------------

[](#installation)

This library is installable via composer.

```
"require": {
    "joshmoody/twitter-consumer": "dev-master"
},

```

Usage
-----

[](#usage)

```
// Get new instance of the twitter consumer.
$consumer = new joshmoody\Twitter\Consumer('your-consumer-key', 'your-consumer-secret);

// Fetch a joshmoody\Twitter\Response object
$response = $consumer->request('statuses/user_timeline.json?screen_name=joshmoody');

// Get the result as a stdclass object
$timeline = $timeline->result();

// ...or as RSS
$rss = $timeline->rss(array('feed_title'=>'Tweets from @username', 'feed_url' => 'http://yourdomain.com/path/to/rss/feed', 'feed_description'=>'My Tweets'));

// ...or as JSON encoded
$json = $timeline->json();

```

TODO
----

[](#todo)

- Add option to expand auto-shortened URLs
- Add optional feed caching

Unit Testing.
-------------

[](#unit-testing)

[![Build Status](https://camo.githubusercontent.com/f61f832c4a4de11aa64ec4d10880e2de064cffbe8b80996e6c1c0e2ec2460fba/68747470733a2f2f7472617669732d63692e6f72672f6a6f73686d6f6f64792f747769747465722d636f6e73756d65722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/joshmoody/twitter-consumer)

This package uses PHPUnit for unit testing. To run the unit tests, you'll need to install the dependencies using Composer:

```
php composer.phar install --dev.

```

Then run the tests with `vendor/bin/phpunit`

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/1cda8a02682a999e89bc2443c6c169b1dc9228cc4709d0b5fad642dc2a151141?d=identicon)[joshmoody](/maintainers/joshmoody)

---

Top Contributors

[![joshmoody](https://avatars.githubusercontent.com/u/1504862?v=4)](https://github.com/joshmoody "joshmoody (21 commits)")

### Embed Badge

![Health badge](/badges/joshmoody-twitter-consumer/health.svg)

```
[![Health](https://phpackages.com/badges/joshmoody-twitter-consumer/health.svg)](https://phpackages.com/packages/joshmoody-twitter-consumer)
```

PHPackages © 2026

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