Ladies and Gentlemen, it gives me great pleasure to introduce my “Twitter User Biography Downloader Excel Spreadsheet Thingymajig”.
This is an Excel spreadsheet I developed containing two macros that access the Twitter API to pull XML feeds into new sheets in the spreadsheet.
The first macro takes a series of usernames (which you provide in a list) and then delivers back the biographical detail for each user in a new worksheet. It also gives you the option of downloading up to the last 1200 tweets for each of the users, into separate (new) worksheets. This facility can also be used (by providing your own username) as a way of archiving your won tweets.
The second macro takes a username, and a Twitter list name, and provides back the user biographies for everyone on that list.
The biography details these macros return are:
- User ID
- Real Name
- Bio Location
- Biog Image
- Biog Website
- Joined on
- Tweets sent
- Number of Favourites
- Number of Times Listed
The tweet details that the first macro returns are:
- Unique Tweet Reference Number
- Time And Date Of Tweet
- Text Of Tweet
- Source – What App Was Used To Update Twitter?
- Has anyone favorited this tweet?
- In Reply To Tweet Id
- In Reply To Screen Name
- Retweet Count
- Retweeted (True or False)
- User Id
- User Real Name
- User Screen Name
- User Location
- Latitude And Longitude of tweet
- Place Id
- Place Full Name
- Place Name
- Place Type
- Paging Number (which page of results was the tweet on).
I am not a programmer, I am a tinkerer so I know my code is not as bullet proof as it could be. Sometimes the macros don’t return as many results as you expect them to (especially if twitter is not responding as quickly as I would like!). Often running the macro again will solve this issue. If you are a better programmer than I and wish to develop it further, feel free – but I’d be grateful for a heads up so I can use your improved version!
It won’t work on protected or suspended accounts.
Please don’t ask me to explain how the macros work – I understand it enough that it works, but probably not enough to be able to explain it to someone else! If you are having issues with it, I am happy to try and help, but it is offered “as is” with no guarantees!
If you are running it multiple times, be aware that the macros will overwrite any data already added (as it refers to each worksheet that it creates by name).
The spreadsheet calls on version 1 of the Twitter API. This means it is subject to rate limiting. If you hit the rate limits (i.e. have made too many calls to the Twitter database) leave it an hour or so, then try again.
Version 1 of the twitter API is being depreciated. This means the macros are unlikely to work beyond March 2013. This is a major bummer, as I actually use these macros (or versions of them) a lot in my work. I can’t find anywhere how to OAuth-enticate using VBA, so I will have to find a different way of working from March. I could write a major rant about the direction that Twitter is taking (and why I completely disagree with it) but for now, you might like to read more information on the changes that Twitter are making to their API on the twitter developers blog.
If you like this (or if you don’t!) please leave me a comment.