Twitter data crawler, replies archiver, and statistics generator.
This is not production code. This is a pre-alpha web application. The intended audience is server administrators with experience installing and troubleshooting PHP/MySQL hosted web applications. While Twitaltyic uses OAuth to access Twitter, the webapp’s login is not as secure as it should be. Right now this code is for experimentation and tinkering only. Do not run on a public, production server. You have been warned.
In future versions, this will get easier.
- Create a database and select it, i.e., CREATE DATABASE twitalytic
- Build tables with
build-db.sql
- Log into Twitter and register your Twitalytic instance. Set the callback URL to
http://yourserver.com/path-to-twitalytic/account/oauth.php
. Write down the items labeled “Consumer key” and “Consumer secret.”
- Shared libraries: Edit
twitalytic/common/config.inc.php
. Add your database credentials, file and webapp paths, and the key/secret you got from Twitter in the previous step. - Crawler: Edit
twitalytic/crawler/config.crawler.inc.php
, set include path to the absolute location oftwitalytic/common
- Webapp: Edit
twitalytic/webapp/config.webapp.inc.php
, set include path to the absolute location oftwitalytic/common
- Webserver (optional): Set
httpd.conf
DocumentRoot totwitalytic/webapp/
Visit the web application on your server, register/login, and set up your Twitter accounts.
Then, run the crawler to load your Twitter data:
$ php crawler/crawl.php
To view what’s going on with the crawler, use this command:
$ tail -f crawler/logs/crawler.log
Cron the crawler’s run command to go at least once an hour.