PHPackages                             metrixio/twitter - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. metrixio/twitter

ActiveProject[DevOps &amp; Deployment](/categories/devops)

metrixio/twitter
================

This tool lets you easily gather data about tweets, retweets, likes, followers, and more from Twitter. You can use it to track the performance of your own account or gather data for research or analysis. It works with Prometheus and Grafana.

1.0.0(3y ago)01MITPHPPHP &gt;=8.1

Since Dec 26Pushed 3y ago1 watchersCompare

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

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

Twitter metrics collector
=========================

[](#twitter-metrics-collector)

[![](https://camo.githubusercontent.com/8fcd86afe92ea96e4755c7a44cd7c5d22cdeca536f7fc5b65bb313008d3ea5dd/68747470733a2f2f706f7365722e707567782e6f72672f6d6574726978696f2f747769747465722f726571756972652f706870)](https://packagist.org/packages/metrixio/twitter)[![](https://camo.githubusercontent.com/868d7a31804f07e57e49b703d9b9b9f1bff625022182b12efe688e4642249dac/68747470733a2f2f706f7365722e707567782e6f72672f6d6574726978696f2f747769747465722f76657273696f6e)](https://packagist.org/packages/metrixio/twitter)[![](https://github.com/metrixio/twitter/actions/workflows/docker-image.yml/badge.svg)](https://github.com/metrixio/twitter/actions)[![](https://camo.githubusercontent.com/dc4260505ec27d14fed28ab67b396b4fff5b413bc8c56f64033eee0fe79c4b0e/68747470733a2f2f706f7365722e707567782e6f72672f6d6574726978696f2f747769747465722f646f776e6c6f616473)](https://packagist.org/packages/metrixio/twitter)

[![twitter](https://user-images.githubusercontent.com/773481/209433204-d3a5efb4-80f8-495b-bfbf-f4806f4d094b.png)](https://user-images.githubusercontent.com/773481/209433204-d3a5efb4-80f8-495b-bfbf-f4806f4d094b.png)

This tool lets you easily gather data about tweets, retweets, likes, followers, and more from Twitter. You can use it to track the performance of your own account or gather data for research or analysis.

It works with Prometheus and Grafana to collect data from Twitter, store it in Prometheus, and create visualizations with Grafana. You can use Grafana to customize the data you collect and create dashboards that fit your needs.

We hope you find it helpful!

Usage
-----

[](#usage)

To get started with this package, you'll need to have a Twitter developer account and create [Twitter API credentials](https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens.html). Once you have those, you can begin collecting metrics data from Twitter.

It's a simple process that can help you track the performance of your own account or gather data for research or analysis purposes.

Check out the documentation in the [dashboard](https://github.com/metrixio/dashboard) repository. That should give you all the details you need to get going.

```
# Twitter
TWITTER_CONSUMER_KEY=
TWITTER_CONSUMER_SECRET=
TWITTER_ACCESS_TOKEN=
TWITTER_ACCESS_TOKEN_SECRET=

# Twitter account ids to follow (comma separated)
TWITTER_ACCOUNTS=
```

### Docker

[](#docker)

```
version: "3.7"

services:
  twitter-metrics:
    image: ghcr.io/metrixio/twitter:latest
    environment:
      TWITTER_CONSUMER_KEY:...
      TWITTER_CONSUMER_SECRET:...
      TWITTER_ACCESS_TOKEN:...
      TWITTER_ACCESS_TOKEN_SECRET:...
      TWITTER_ACCOUNTS:...
    restart: on-failure

  prometheus:
    image: prom/prometheus
    volumes:
      - ./runtime/prometheus:/prometheus
    restart: always

  grafana:
    image: grafana/grafana
    depends_on:
      - prometheus
    ports:
      - 3000:3000
    volumes:
      - ./runtime/grafana:/var/lib/grafana
    restart: always
```

### Local server

[](#local-server)

```
composer create-project metrixio/twitter
```

Define the repositories you want to track in `.env` file

```
# Twitter
TWITTER_CONSUMER_KEY=xxx
TWITTER_CONSUMER_SECRET=xxx
TWITTER_ACCESS_TOKEN=xxx
TWITTER_ACCESS_TOKEN_SECRET=xxx

# Twitter account ids to follow (comma separated)
TWITTER_ACCOUNTS=1234,123123
```

Once the project is installed and configured you can start application server:

```
./rr serve
```

Metrics will be available on .

> **Note**: To fix unable to open metrics page, change metrics address in RoadRunner config file to `127.0.0.1:2112`.

---

The package is built with some of the best tools out there for PHP. It's powered by [Spiral Framework](https://github.com/spiral/framework/), which makes it super fast and efficient, and it uses [RoadRunner](https://github.com/roadrunner-server/roadrunner) as the server, which is a really great tool for collecting metrics data for Prometheus.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

1235d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/773481?v=4)[Pavel Buchnev](/maintainers/butschster)[@butschster](https://github.com/butschster)

---

Top Contributors

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

---

Tags

collectordockergrafanametricsphp81prometheusprometheus-metricsroadrunnerspiral-framework

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[sarfraznawaz2005/servermonitor

Laravel package to periodically monitor the health of your server and website.

19513.2k1](/packages/sarfraznawaz2005-servermonitor)[shopware/deployment-helper

Shopware deployment tools

19305.3k5](/packages/shopware-deployment-helper)[yousign/zdd-message-bundle

Assert Zero Downtime Deployment compliance for messages

28113.5k](/packages/yousign-zdd-message-bundle)

PHPackages © 2026

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