PHPackages                             alexsawallich/zend-twitter-api - 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. alexsawallich/zend-twitter-api

ActiveLibrary

alexsawallich/zend-twitter-api
==============================

Zend Framework 2-Module which wraps J7mbo's PHP Twitter API.

0151PHP

Since Nov 17Pushed 10y ago1 watchersCompare

[ Source](https://github.com/alexsawallich/ZendTwitterApi)[ Packagist](https://packagist.org/packages/alexsawallich/zend-twitter-api)[ RSS](/packages/alexsawallich-zend-twitter-api/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
============

[](#introduction)

*ZendTwitterApi* is a very simple Zend-Framework 2-Module, which wraps [J7mbo's PHP Twitter API](https://github.com/J7mbo/twitter-api-php). *ZendTwitterApi* provides a service which can be retrieved from the `ServiceManager`. 'OAuth'-Tokens, -secrets and so on, can be specified in your config-file.

This means, that this module itself doesn't do anything. It's up to you to build modules using this API.

Installation
============

[](#installation)

Installation can be done through composer.

Just add

```
"alexsawallich/zend-twitter-api": "dev-master"

```

to your application's `composer.json` and execute `php composer.phar update`.

Then copy `vendor/alexsawallich/zend-twitter-api/config/zend-twitter-api.global.php.dist` from to `./autoload/zend-twitter-api.global.php`. Open the copied file and set the options, according to your twitter-application.

If you don't have a twitter-application yet, you can register one for free here: [Twitter Application Management](https://apps.twitter.com/).

Usage
=====

[](#usage)

Anywhere in your code, where you have access to the ServiceLocator you can do the following:

```
$twitterApi = $this->getServiceLocator()->get('ZendTwitterApi');

```

What to do now?
---------------

[](#what-to-do-now)

Check out the GitHub-page of [J7mbo's PHP Twitter API](https://github.com/J7mbo/twitter-api-php) to see what you can do with the API.

An example to get the 3 latest tweets for the user @alexsawallichde would be:

```
$api = $this->getServiceLocator()->get('ZendTwitterApi');
$url = 'https://api.twitter.com/1.1/statuses/user_timeline.json';
$getfield = '?count=3&trim_user=1&exclude_replies=1&user_id=alexsawallichde';
$latestTweets = $api->setGetfield($getfield)
                    ->buildOauth($url, 'GET')
                    ->performRequest();

$json = json_decode($latestTweets);

```

A possible use-case would be to put something like the given example into a view-helper.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

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/ac22e0249515780b9f33aa796be21aa402a41d1ab655159f6680ed7057b6435d?d=identicon)[alexsawallich](/maintainers/alexsawallich)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/alexsawallich-zend-twitter-api/health.svg)

```
[![Health](https://phpackages.com/badges/alexsawallich-zend-twitter-api/health.svg)](https://phpackages.com/packages/alexsawallich-zend-twitter-api)
```

PHPackages © 2026

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