|Export Twitter Friends and Followers v2.1.2|
|Created by mhawksey. Read more about this at:|
|With this spreadsheet you can:|
|- Export your Twitter Friends and Followers|
|Updated version available here|
|- Control - You register for your own API key with Twitter so you have full control of the account |
- Automatic whitelisting – Twitter currently automatically whitelist applications built in Google Spreadsheets this means instead of 150 API request per hour you get 20,000 meaning you can export a lot
- Playing with the data – as you are importing straight into a spreadsheet you can do all of your own data manipulation like sorting, filtering and creating your own formula for things like follow/follower ratios
- Backup – Google Spreadsheets allow you to download copies of spreadsheets in different formats
- Share – You can make your lists of friends/followers easily viewable
|1. Make a copy of this spreadsheet (File > Make a copy) < make sure you are logged in first or this option will be greyed out|
2. In this spreadsheet from the Twitter drop-down menu (next to Help) select 'Configure'. You may need to run this twice, the first time to authorise the script and follow the instructions for obtaining a Customer Key and Secret from Twitter
- If there is no Twitter menu option click on this button ->
3. Select Tools > Scripts > Script Editor ... and from the Script Editor window select Run > aTest.
4. This should bring up an authorization message box, click on Authorize.
5. In the Twitter Authorization window enter your login details if required and select 'Allow'
6. Close the Script Editor window and a dialog box in the main spreadsheet should indicate if you have successfully connected to Twitter
7. If all is okay you can now select Twitter > Get Followers and Twitter > Get Friends (when these run your sheet may go blank, if so refresh your browser window)
|If you get a 'Exceeded absolute-time timeout in milliseconds' error message there is a manual function in the script editor called getLotsOfFriendAndFo(). To use this clear any existing data imported to the particular sheet and enter the following details into the function in the script editor:|
sheetName – sheet name you want to import the data to;
friendOrFo – whether you want ‘friends’ or ‘followers’; and
optScreenName – the screen name of the person
To run the script Run > getLotsOfFriendAndFo as many times as needed (the script will import 100 friends/followers at a time) or if you want to go away and make a cup of tea use Triggers > Current project triggers and add getLotsOfFriendAndFo as a time-driven function to run every minute (once you’ve finished your tea best to delete this trigger).
If something goes wrong during the import you can start over manually deleting any data and running resetGetLotsOfFriendAndFo (this resets the cursor used with the Twitter API).
[You can also get the Friends/Followers for other users using from the options in the Twitter menu]
|Only a selection of the data returned from Twitter is copied into the spreadsheet, below are all the possible column headers you can use.|
|friends||You'll need to remove // from line 218 in the Script Editor|