Skip to content
/ Twitdiff Public

Quick and hacky script to be cronned to give you a daily update of your followers on Twitter.

Notifications You must be signed in to change notification settings

lozzd/Twitdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Twitdiff

What?

This is a quick and dirty PHP script that retrieves your current Twitter followers, grabs some basic info about them and saves it to a file.

Cron it, and it will send you an email each time it runs to let you know who started and stopped following you.

Uses the Twitter 1.1 API with oAuth so you'll need to create an application and grant yourself some access keys. You can do that here: https://dev.twitter.com/apps

Setup

The following variables need to be set in config.php (move config.php.example to config.php)

$username - Your Twitter username

$difffile_filename - A path on disk to store the diff file. Yesterday's will be stored at $difffile_filename-yesterday

$countfile_filename - A path on disk to store the count file.

$email_recipient - The email address of the person who will receive the report

$consumer_key, $consumer_secret - Your Twitter oAuth consumer key and secret

$oauth_access_token, $oauth_access_token_secret - Your Twitter oAuth access token and token secret

Run once to ensure it succeeds and to populate the first day's data.

Then cron it something like this: 0 7 * * * /usr/bin/php /home/yourname/twitdiff/go.php >> /var/log/twitdiff.log 2>&1

You will receive a daily report to your email address with the differences.

Bugs?

Probably. Patches welcome :)

About

Quick and hacky script to be cronned to give you a daily update of your followers on Twitter.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages