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. [API Development](/categories/api)
4. /
5. alexsawallich/zend-twitter-api

ActiveLibrary[API Development](/categories/api)

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 today

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 18% 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://avatars.githubusercontent.com/u/4184816?v=4)[Alex Sawallich](/maintainers/alexsawallich)[@alexsawallich](https://github.com/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)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

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