{"id":15027524,"url":"https://github.com/metrixio/twitter","last_synced_at":"2026-03-16T21:31:47.462Z","repository":{"id":65103276,"uuid":"581556365","full_name":"metrixio/twitter","owner":"metrixio","description":"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.","archived":false,"fork":false,"pushed_at":"2022-12-27T10:32:52.000Z","size":1563,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T20:29:14.531Z","etag":null,"topics":["collector","docker","grafana","metrics","php81","prometheus","prometheus-metrics","roadrunner","spiral-framework"],"latest_commit_sha":null,"homepage":"https://dashboard.metrixio.dev/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metrixio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-23T14:38:43.000Z","updated_at":"2022-12-28T08:29:43.000Z","dependencies_parsed_at":"2023-01-03T09:17:53.840Z","dependency_job_id":null,"html_url":"https://github.com/metrixio/twitter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixio%2Ftwitter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixio%2Ftwitter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixio%2Ftwitter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metrixio%2Ftwitter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metrixio","download_url":"https://codeload.github.com/metrixio/twitter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243330319,"owners_count":20274039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["collector","docker","grafana","metrics","php81","prometheus","prometheus-metrics","roadrunner","spiral-framework"],"created_at":"2024-09-24T20:06:36.763Z","updated_at":"2025-12-28T01:23:37.966Z","avatar_url":"https://github.com/metrixio.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitter metrics collector\n\n\u003ca href=\"https://packagist.org/packages/metrixio/twitter\"\u003e\u003cimg src=\"https://poser.pugx.org/metrixio/twitter/require/php\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/metrixio/twitter\"\u003e\u003cimg src=\"https://poser.pugx.org/metrixio/twitter/version\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/metrixio/twitter/actions\"\u003e\u003cimg src=\"https://github.com/metrixio/twitter/actions/workflows/docker-image.yml/badge.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://packagist.org/packages/metrixio/twitter\"\u003e\u003cimg src=\"https://poser.pugx.org/metrixio/twitter/downloads\"\u003e\u003c/a\u003e\n\n![twitter](https://user-images.githubusercontent.com/773481/209433204-d3a5efb4-80f8-495b-bfbf-f4806f4d094b.png)\n\nThis 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. \n\nIt 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.\n\nWe hope you find it helpful!\n\n## Usage\n\nTo 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. \n\nIt's a simple process that can help you track the performance of your own account or gather data for research or analysis purposes.\n\nCheck out the documentation in the [dashboard](https://github.com/metrixio/dashboard) repository. That should give you all the details you need to get going.\n\n```dotenv\n# Twitter\nTWITTER_CONSUMER_KEY=\nTWITTER_CONSUMER_SECRET=\nTWITTER_ACCESS_TOKEN=\nTWITTER_ACCESS_TOKEN_SECRET=\n\n# Twitter account ids to follow (comma separated)\nTWITTER_ACCOUNTS=\n```\n\n### Docker\n\n```yaml\nversion: \"3.7\"\n\nservices:\n  twitter-metrics:\n    image: ghcr.io/metrixio/twitter:latest\n    environment:\n      TWITTER_CONSUMER_KEY:...\n      TWITTER_CONSUMER_SECRET:...\n      TWITTER_ACCESS_TOKEN:...\n      TWITTER_ACCESS_TOKEN_SECRET:...\n      TWITTER_ACCOUNTS:...\n    restart: on-failure\n\n  prometheus:\n    image: prom/prometheus\n    volumes:\n      - ./runtime/prometheus:/prometheus\n    restart: always\n\n  grafana:\n    image: grafana/grafana\n    depends_on:\n      - prometheus\n    ports:\n      - 3000:3000\n    volumes:\n      - ./runtime/grafana:/var/lib/grafana\n    restart: always\n```\n\n### Local server\n\n```bash\ncomposer create-project metrixio/twitter\n```\n\nDefine the repositories you want to track in `.env` file\n\n```dotenv\n# Twitter\nTWITTER_CONSUMER_KEY=xxx\nTWITTER_CONSUMER_SECRET=xxx\nTWITTER_ACCESS_TOKEN=xxx\nTWITTER_ACCESS_TOKEN_SECRET=xxx\n\n# Twitter account ids to follow (comma separated)\nTWITTER_ACCOUNTS=1234,123123\n```\n\nOnce the project is installed and configured you can start application server:\n\n```bash\n./rr serve\n```\n\nMetrics will be available on http://127.0.0.1:2112.\n\n\u003e **Note**:\n\u003e To fix unable to open metrics page, change metrics address in RoadRunner config file to `127.0.0.1:2112`.\n\n-----\n\nThe 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrixio%2Ftwitter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetrixio%2Ftwitter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetrixio%2Ftwitter/lists"}