PHPackages                             danvin-test/twitter-activity - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. danvin-test/twitter-activity

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

danvin-test/twitter-activity
============================

Simple PHP Twitter User Activity Checker

1.1(7y ago)010MITPHP

Since Jun 7Pushed 7y agoCompare

[ Source](https://github.com/danvin-test/twitter-activity)[ Packagist](https://packagist.org/packages/danvin-test/twitter-activity)[ RSS](/packages/danvin-test-twitter-activity/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Simple PHP Twitter User Activity Checker (based on Silex 2.3, Twitter API v1.1)
===============================================================================

[](#simple-php-twitter-user-activity-checker-based-on-silex-23-twitter-api-v11)

This small web app takes user's twitter screen name as a parameter and return a JSON-encoded array containing "hour -&gt; tweets count" for a given user, to determine what hour of the day they are most active. It also provides demonstration of the Silex's routing.

Requirements
------------

[](#requirements)

1. PHP 7.1.3 or later
2. Enabled PHP CURL module
3. Enabled mod\_rewrite module (only for usage on webserver)

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

[](#installation)

1. Install Composer

    ```
     curl -s https://getcomposer.org/installer | php

    ```
2. Execute

    ```
     php composer.phar create-project danvin-test/twitter-activity project_name

    ```

Configuration
-------------

[](#configuration)

**Twitter API Credentials**

Edit config.json, located in the root folder of the project, to set up your [Twitter API credentials](https://developer.twitter.com/en/docs/basics/getting-started).

Notable mention: This web app uses [statuses/user\_timeline](https://developer.twitter.com/en/docs/tweets/timelines/api-reference/get-statuses-user_timeline.html) Twitter API. Advanced configuration available in the config.json, under `twitterRequestSettings` section.

**.htaccess**

If your site is not at the webroot level you will have to uncomment the RewriteBase statement and adjust the path to point to your directory, relative from the webroot. More information available at the [Silex Webserver Configuration](https://silex.symfony.com/doc/2.0/web_servers.html) page

Usage
-----

[](#usage)

The application has 3 endpoints:

1. "/" - will respond with "Try /hello/:name" as text
2. "/hello/Daniel" - will respond with “Hello Daniel” as text
3. "/histogram/Ferrari" - will respond with a JSON-encoded array displaying the number of tweets per hour of the day. Most active hours will be presented at the top of the array.

**CLI**

```
php index.php GET /
php index.php GET /hello/Daniel
php index.php GET /histogram/Ferrari

```

**WebServer**

```
http://localhost/
http://localhost/hello/daniel
http://localhost/histogram/Ferrari

```

Running the tests
-----------------

[](#running-the-tests)

1. Make sure you have PHPUnit [installed](https://phpunit.de/getting-started/phpunit-7.html).
2. To execute the tests, navigate into your project's folder and run

    ```
     phpunit

    ```

Built With
----------

[](#built-with)

1. [Silex](https://silex.symfony.com/)
2. [twitter-api-php](https://github.com/J7mbo/twitter-api-php)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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

Every ~0 days

Total

2

Last Release

2892d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9a23153b98030993cfee6f98ea1a87570d4552c0125293008ddacc761d3d501b?d=identicon)[affiliate54](/maintainers/affiliate54)

---

Top Contributors

[![danvin-test](https://avatars.githubusercontent.com/u/40044018?v=4)](https://github.com/danvin-test "danvin-test (9 commits)")

### Embed Badge

![Health badge](/badges/danvin-test-twitter-activity/health.svg)

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

PHPackages © 2026

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