The old script which I created to keep track of my Twitter followers stopped working when Twitter stopped access to their old API. The new API, v1.1, offers much more functionality but requires authentication in order to retrieve the list of followers. With this in mind, I updated the script in order to work with the new API.
To save time, I made use of the twitteroauth library created by Abraham Williams. It also utilises code from Web Dev Door – that page also has information about how to setup an application on Twitter, I would highly recommend following the details there.
The script works in a similar way to before, except this time I don’t need to poll Twitter for the username for each id – the initial request for the followers list provides all the information required.
I’ve updated the script on GitHub – if you need any help setting this up please give me a shout, I’d be happy to help.
Update 13/8/2014 – Twitter account ids can now be larger than the maximum value that can be stored in an INT, so I have changed the ‘id’ to a BIGINT rather than an INT in the SQL used to create the table. Thanks to Chris Millard for his help with this!