dev-master
9999999-devSimple PHP Twitter User Activity Checker
MIT
The Requires
1.1
1.1.0.0Simple PHP Twitter User Activity Checker
MIT
The Requires
1.0
1.0.0.0Simple PHP Twitter User Activity Checker
MIT
The Requires
Wallogit.com
2017 © Pedro PelĂĄez
Simple PHP Twitter User Activity Checker
This small web app takes user's twitter screen name as a parameter and return a JSON-encoded array containing "hour -> 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., (*1)
Install Composer, (*2)
curl -s https://getcomposer.org/installer | php
Execute, (*3)
php composer.phar create-project danvin-test/twitter-activity project_name
Twitter API Credentials, (*4)
Edit config.json, located in the root folder of the project, to set up your Twitter API credentials., (*5)
Notable mention: This web app uses statuses/user_timeline Twitter API. Advanced configuration available in the config.json, under twitterRequestSettings section., (*6)
.htaccess, (*7)
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 page, (*8)
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., (*9)
CLI, (*10)
php index.php GET / php index.php GET /hello/Daniel php index.php GET /histogram/Ferrari
WebServer, (*11)
http://localhost/ http://localhost/hello/daniel http://localhost/histogram/Ferrari
To execute the tests, navigate into your project's folder and run, (*12)
phpunit
Simple PHP Twitter User Activity Checker
MIT
Simple PHP Twitter User Activity Checker
MIT
Simple PHP Twitter User Activity Checker
MIT