Export Twitter Followers and Friends using a Google Spreadsheet

Note: Twitter recently wrote to me reminding me that

methods of obtaining and exporting Twitter content obtained via the Twitter API is prohibited by section I.4.A of our API Terms of Service (https://dev.twitter.com/terms/api-terms ), specifically:

You will not attempt or encourage others to sell, rent, lease, sublicense, redistribute, or syndicate access to the Twitter API or Twitter Content to any third party without prior written approval from Twitter. If you provide an API that returns Twitter data, you may only return IDs (including tweet IDs and user IDs). You may export or extract non-programmatic, GUI-driven Twitter Content as a PDF or spreadsheet by using "save as" or similar functionality. Exporting Twitter Content to a datastore as a service or other cloud based service, however, is not permitted.

Following clarification from Twitter I making this template available again but please note.

By using this template you agree it is for personal use only and the data is not made publicly available.

Recently I’ve noticed a growing number of people arrive at this blog having searched for ‘export twitter followers’. Rather than them leaving disappointed here’s a Google Spreadsheet I threw together which allows you to grab a copy of your friends/followers:

*** Google Spreadsheet to Export Twitter Friends and Followers ***

Benefits of using Google Spreadsheet

  • Control - You register for your own API key with Twitter so you have full control of the account
  • 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

Where’s this all going?

Having already done other things with the Twitter API and Google Spreadsheets (See Populating a Twitter List via Google Spreadsheet … Automatically!, Collect/backup tweets in a Google Spreadsheet, Google Apps Script, Spreadsheets, Twitter and Gadgets) the Twitter/Google Spreadsheet back is well and truly broken. You’ll probably see fewer posts one this area with new stuff instead I’ll probably start properly documenting the little code snippets I use (but if you have any interesting ideas you want help with get in touch).

This doesn’t mean I’ll be walking away from Google Spreadsheets. As recent posts like Turning Google Spreadsheets into a personal or group bookmarking service, show there is huge scope in using Spreadsheets as a very flexible rapid development platform.

Below are some bits of the code used in my new spreadsheet (all the code is viewable via the Script Editor in the Spreadsheet):

function tw_request(method, api_request){
  // general purpose function to interact with twitter API
  // for method and api_request doc see http://dev.twitter.com/doc/
  // retuns object
  var oauthConfig = UrlFetchApp.addOAuthService("twitter");
  oauthConfig.setAccessTokenUrl(
      "https://api.twitter.com/oauth/access_token");
  oauthConfig.setRequestTokenUrl(
      "https://api.twitter.com/oauth/request_token");
  oauthConfig.setAuthorizationUrl(
      "https://api.twitter.com/oauth/authorize");
  oauthConfig.setConsumerKey(getConsumerKey());
  oauthConfig.setConsumerSecret(getConsumerSecret());
  var requestData = {
        "method": method,
        "oAuthServiceName": "twitter",
        "oAuthUseToken": "always"
      };
   try {
      var result = UrlFetchApp.fetch(
          "https://api.twitter.com/1/"+api_request,
          requestData);
      var o  = Utilities.jsonParse(result.getContentText());
    } catch (e) {
      Logger.log(e);
    }
   return o;
}

function getFriendAndFo(sheetName){
  var ss = SpreadsheetApp.getActiveSpreadsheet();
  var sheet = ss.getSheetByName(sheetName);
  sheet.getRange(2, 1, sheet.getLastRow(), sheet.getMaxColumns()).clear({contentsOnly:true}); //clear sheet
  var cursor = "-1";
  while(cursor != "none"){ // while twitter returns data loop
    try {
      var o = tw_request("GET", "statuses/"+sheetName+".json?cursor="+cursor); // note using sheetname to build api request
      var data = o.users;
      for (i in data){ // extracting some subobjects to top level (makes it easier to setRowsData)
        if (data[i].status){
          for (j in data[i].status){
            data[i]["status_"+j] = data[i].status[j];
          }
        }
        if (data[i].screen_name){ // also build url to jump to profile page
          data[i]["profile_link"] = "http://twitter.com/"+data[i].screen_name;
        }
      }
      var headRange = sheet.getRange(1, 1, 1, sheet.getMaxColumns());
      var rowIndex = sheet.getLastRow()+1;
      setRowsData(sheet, data, headRange, rowIndex); // dump data for this loop to sheet
      if (o.next_cursor!="0"){
        cursor = o.next_cursor; // get next cursor
      } else {
        cursor = "none"; // break
      }
    }  catch (e) {
      Logger.log(e);
    }

  }
}

187 thoughts on “Export Twitter Followers and Friends using a Google Spreadsheet

  1. Pingback:

  2. Pingback:

  3. Alli

    Thank you for this tutorial! is there anything more simple that will just count the number of followers for a list of twitter accounts? not xml export, because google docs only allows 50 of these per sheet, i need a few more than 50.... any tips very helpful

    thank you!

    Reply
  4. Pingback:

  5. Hey,

    Thanks for that, it works perfectly. I'm only having trouble to enable the other possible column headers in Advanced Options. Could you please help me?

    Reply
  6. Patricio

    Hi! I'm trying to use your spreadsheet, but it fails. I copied both keys to the configure menu. After that, I click on "test connection" aand a msgbox replies "Authorization is required to perform that action.". Do you know what could be working wrong?

    Reply
    1. Post author

      Hi - in the spreadsheet of you go Tools > Script editor then on the dialog box that opens select Run > authorize this should valid your twitter account with the spreadsheet. You'll then be able to run the sheet functions. Of not let me know ;)
      Martin

      Reply
      1. Noah

        Hi, I am having the same issue but when I Run > authorize it tells me "Unexpected error: (line 566)"

        Btw it's very generous of you to create and share tools like this, and to keep replying to poor sobs who ask you for help this far down the line! :) Thanks!

        Reply
        1. Post author

          Hi Noah - haven't been able to conclusively trace the problem but think google occasionally makes a bad copy that doesn't handle authentication properly. Solution is to make a fresh copy of the spreadsheet and start again. Let me know if still a problem

          Reply
          1. I had the same issue (566 line error), however when I checked my OAuth Settings I noticed that I forgot to put a proper Callback URL, which should be: https://spreadsheets.google.com/macros

            Once I did that, saved it, and returned to the spreadsheet, I was able to select Tools > Script > Script Editor and then Run > aTest successfully. I also made sure I was signed OUT of Twitter before doing this.

            Hope this helps,
            Jon

  7. Luke

    Hi - I really like your tutorial. The twitter stuff works well. Have you had success with facebook? I am trying similar approaches but haven't yet cracked it.
    Thanks
    Luke

    Reply
    1. Post author

      Hi Luke - not tried or seen anything yet but it an area I think I'll be looking at in the next 3 months. If you beat me to it interested in how you do it ;)

      Thanks,
      Martin

      Reply
  8. charlton mcilwain

    Thanks for this!

    Any chance you've run into this error message when running the get others followers scripts? And if so, do you know of any resolution?

    Error message: "Exceeded absolute-time timeout in milliseconds"

    Reply
    1. Post author

      hmm that's probably what's causing the problem. Need to see if there is a way to break the task up. Have to have a think short that one.

      Thanks for the feedback

      Martin

      Reply
  9. Ryan

    Hi, when I run aTest, I got an error "TypeError: Cannot read property "statuses_count" from undefined. (line 240)", what is this about?

    Reply
    1. Post author

      Hi Ryan - It essentially means that a connection wasn't successful with the Twitter API (I've updated the script to catch this error better). In the Script editor if you run aTest then View > Log what message do you get?
      Thanks,
      Martin

      Reply
  10. Ryan

    Thank you Martin, I have sorted out, I entered the wrong consumer key. Also, I am wondering if twitter API allows me to extract all tweets from my followers and friends?

    Reply
  11. Wendley

    So, I'm Brazilian and not quite understand how it works, how to have a basic tutorial to show where I make my login, that holds the account you want followers, and so on. A hug.

    Reply
  12. Mon

    Hi, Thanks for the apps. It surely helps a lot. One quick question though, how to add advance option in the spread sheet? Do we just add it in column header?

    Reply
  13. Pingback:

  14. charlton mcilwain

    Awesome! I will give it a shot. Many thanks, going to have my students make use of this in the fall. It will be a great help! One last Q - any chance there's a way to get friends/followers of more than one person at a time?

    Reply
    1. Post author

      @charlton hmm it might be possible the main issue is you only get 350 requests to the twitter API per hour so you will need to do some load balancing (working on another project right now, will come back to this depending on demand)
      martin

      Reply
  15. Richard O

    Thanks a lot for this! Do you know if there is some easy way to turn this spreadsheet into a gdf-file or some other file that I can read into Gephi?

    All the best,
    Richard

    Reply
  16. @richard Gephi will accept a CSV input file. Simplest case is two columns, representing node connected to node. If you just open the CSV file in Gephi it will create the nodes and and the edges for you.

    Reply
  17. Richard O

    Thank you for the response, Tony!

    I will try that. Can I load additional information about each node from a separate file?

    Thank you for a very interesting blog!

    Richard

    Reply
  18. That's a very interesting tool. However I haven't been able to download the data as it says you cannot export data from external sources, and a list - also if managed by you - is intended as an external source. Nevertheless that's a very nice desktop application, ty for sharing!

    Reply
    1. Post author

      Didn't know about the export limitations on SocialBro - thanks for sharing.

      Another tool I'm just about to write about is a MS Excel add-on NodeXL (only available for Windows PC). NodeXL is an advanced network visualisation tool so probably more than you need but it does have a built-in option to get list memberships (one of the Import options) which are saved to a spreadsheet (vertices sheet)

      Martin

      Reply
  19. I'm afraid I'm a Mac user but I'll give it a try anyway on a PC. I have to say I'm interested in visualizations too and I've been playing with Gephi for several months. Although I've a background as a statistician I'm not a coder and one of my main issues has been data export from social networking services. And your blog has revealed to be very useful. Thanks!

    Reply
  20. Hi, I love the concept but when I run the aTest I get a pop-up on the spreadsheet that reads: "OOPS - it didn't work" and when I check the log it reads: "Exception: Unexpected error:" Any suggestions?

    Reply
  21. This worked without a hiccup! Utterly amazed by the simple approach (using Google Docs) to get out info. I have been using Twitter Ruby Gem (it works too) but this was way simpler for many export tasks. Thanks a bunch.

    Reply
  22. Mark

    Great work Martin, thank you! Easy to use and runs beautifully. Been looking for something like this for awhile now.

    If you do develop the spreadsheet to include list data as well, just a column saying which lists you have put them in that would be fabulous.

    Cheers,
    Mark.

    Reply
    1. Mitch

      Actually, I've suddenly got an error saying, "The coordinates or dimensions of the range are invalid. (line 204)" yet I haven't changed anything in the script. Nothing works. Any ideas?

      Reply
      1. Post author

        @Mitch sometimes this error is a temporary fault because Google servers are playing up. One thing you could try is open the Tools > script editor run one of the menu options then check View > log to see if it says anything
        Thanks,
        Martin

        Reply
  23. John L

    Thanks for this.
    However, when trying to authorize the spreadsheet with twitter, I did what you said Script Editor -> Run -> aTest (there was no 'authorization' function). I get the message saying 'Apps Script - Oops. It did not work'. I've followed all the other steps and am not sure what is going wrong.
    I am running in Firefox on a Mac.
    Thank you for your help.

    Reply
    1. Post author

      @John L I think its due to turbulence on either Google or Twitter servers preventing the spreadsheet to connect properly. Afraid I've got no better solution than trying again later
      Martin

      Reply
      1. John L

        I tried it again on a different day and time using Chrome instead of Firefox. Still had the some problem. Oh well.

        Anyway, thanks so much for replying. I really appreciate it.

        Reply
        1. HD

          Hi John and Martin,

          I just had the same problem with the 'Apps-Script Opps' message. I finally went to Tools -> Script Editor, Run -> Authorize and then it fixed the problem. I guess I must have missed that in the original instruction.

          Hope that helps for others with the same error message.
          Heather

          Reply
          1. HD

            ps this is absolutely awesome. I just downloaded 23,000 twitter followers of a company I want to analyze - amazing!

  24. Thanks a lot for your great job. I did everything as you explained above, and I have no error message at all.
    Nevertheless I can not find where is my list.
    I might sound stupid, but all I have is a small yellow message saying: "Running script getFollowers"
    I have more than 30K followers, and I guess it will take some time to show the full list, but after 2 hours, there is nothing else but the yellow message.
    Do you think I did something wrong?
    Thank you in advance for your help.
    Alix.

    Reply
  25. Pingback:

  26. Clay Hoffman

    Whenever I run aTest, I get an error saying, "Oops it didn't work" or "Opps, Authorisation is required to perform that actions" but it doesn't give me the option to authorize it.

    Reply
    1. Post author

      Hmm there should be two athenicate functions in there (either will work) not sure why you can see other code and not these - usually if its a bad copy none of the code is there

      Reply
          1. Tzcttwitt

            Hi,

            The authenticate function is gone.

            I copied the spreadsheet a couple of times and saw same symptoms as Clay Hoffman.

            I reviewed the code of the script and it has no authenticate or similarly named function :-(

          2. Post author

            Hi - I've put a new version of this spreadsheet up. It has improved code for getting the data from Twitter. If there are still problems let me know
            Martin

  27. Pingback:

  28. Clay Hoffman

    I see the authorize script now, but when I run it I keep getting "Unexpected error: (line 580) Dismiss.

    This is whats on line 580-585

    var result = UrlFetchApp.fetch(
    "http://api.twitter.com/1/account/verify_credentials.json",
    requestData);
    var o = Utilities.jsonParse(result.getContentText());
    ScriptProperties.setProperty("STORED_SCREEN_NAME", o.screen_name);
    }

    Reply
      1. Post author

        Sometimes I think google doesn't copy the authorisation tokens from twitter properly which leaves you in limbo with a half authenticated script. I'm afraid the only way I've found to get around this is to make a fresh copy of the template.
        Martin

        Reply
  29. Joel

    This script is great, and I appreciate all the work that you have done.
    I looked through the comments, and it looks like other people aren't having this issue, so I'll see if I have something set up incorrectly. But, when I run the "getLotsOfFriendAndFo", I get an error that says "ReferenceError: "users" is not defined. (line 172)". Line 172 says: "var chunks = chunk(users,100);". I am using V2 of the spreadsheet. I have tried on a couple of copies of the sheet. I am also trying to pull in someone elses followers. It works when I use the "get other persons followers" from the twitter menu, but it's been timing out because of the volume. Any help would be appreciated, although I completly understand that you don't want to spend a ton of time troubleshooting a free script you made.

    Reply
    1. Post author

      Hi Joel - As you asked so nicely I had a look and there was a problem with the script. I've updated the code so if you grab a new copy of v2.1 it should work (fingers crossed - and if it doesn't let me know ;)
      Martin

      Reply
    1. I think I'm actually looking for

      following_request_sent

      (the timestamp for the follow request YOU sent to a friend / someone you want to follow)

      I think follow_request_sent is the timestamp for follow requests from YOUR followers?

      Does the following timestamp exist?

      Reply
      1. Post author

        Hi Jonah - you are right in that putting follow_request_sent as one of the headers means that data is populated. As you have probably discovered now this only returns true or false. The data returned by the bit of the API used in this solution unfortunately doesn't include a following request timestamp (if this data is important to you, you might want to look at the socialbro.com app)
        Martin

        Reply
  30. Nice stuff, works like a charm!

    In order to visualize the network in gephi I'd like to also include the friends/followers relation among all friend/followers for a Twitter account. (Ie not get the complete list of all their F/F, but only the interconnection between the listed ones)

    Is this something you have looked at?

    Reply
    1. Post author

      Hi Johan, I do have a script which constructs friend follow relationships but its very restricted in how many relationships it can manage (e.g. ignores relationships over 5000 and can only manage base networks of 300). What I've done in the past is use NodeXL. The import via twitter list lets you paste a list of username you want to get relationships for and generates an edge list, which can either be analysed further in NodeXL or exported to gephi)
      Martin

      Reply
  31. Almir Souza

    Hi Martin, how are you?
    I configured everything according to the steps and I have no error message at all, however, can not download my complete list of followers.
    After all set performing "getFollowers" and showed that first run in the bottom right a message 100 to 200 of 148000, but when he arrived in 4900 to 5000 of 148000 the system kept running and not download anything. I redid the process a few times and still managed to download about 26,000, but 122,000 still missing. I did something wrong? I left to do something? What do I need to get the 148,000?
    But without doubt the tool is fantastic!

    Reply
    1. Post author

      Hi Almir, this tool is mainly geared around a 5000 follower max. There is a supplemental script in Tools > Script editor ... called getMoreFriendsAndFollowers which can get more but is limited by the google spreadsheet maximum of 400,000 cells (with the number of columns used its around 40,000 twitter account details

      Reply
      1. Almir Souza

        Martin, thanks for the help. I looked in Tools -> Script Editor -> getMoreFriendsAndFollowers, but I found this script, it does not exist for me, at least by that name. For me there and getAnotherFollowers getLotsOfFriendAndFo. It is one of these two?

        Reply
          1. Almir Souza

            Hahahaha ... okay! It happens. So, I tried that too, but does not return all my followers. He lowers 5000 and the first stop. Then re-run the scrip getFollowers and returns the message "Oops!
            Exceeded maximum execution time. "Then I ran the scrip getLotsOfFriendAndFo you said, but nothing happens. What is the procedure? I'm sorry to bother.

          2. Post author

            To use this new code you need to enter the following information directly into the script editor where prompted in the getLotsOfFriendAndFo function:

            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

  32. Almir Souza

    Hi Martin, how are you? Happy 2012!
    Man, I'm picking up the same child to extract all the data. For this tool will be to extract that really gives my 150,000 followers?

    I was downloading the data and I returned the message limitation 400,000 cells from there I created a new worksheet and the worksheet name added to the scripts and getFollowers getLotsOfFriendAndFo script editor and yet the same message appears.

    Any other alternative?

    Hugs.

    Reply
    1. Post author

      Hi when you reach the 400k limit make a copy of you original spreadsheet then remove the existing imported data and continue running the getmorefriendandfo script (you can rejoin the data by downloading as .csv and pasting together in Excel)

      Reply
        1. Almir Souza

          I just do what you said.

          Step 1: I ran getFollowers the first time and fell 5000 followers
          Step2: getFollowers ran a second time and fell over 5000 followers
          Step3: In the third execution getFollowers returned the message had reached the limit of 400k
          Step4: I made a copy of the worksheet and then it performed the function clearSheet to erase the data that had previously downloaded
          Step 5: Ran getLotsOfFriendAndFo, however, limit 400k message back to present, once again ran the function clearSheet and yet the message continued ... ?

          Reply
      1. Almir Souza

        I just do what you said.

        Step 1: I ran getFollowers the first time and fell 5000 followers
        Step2: getFollowers ran a second time and fell over 5000 followers
        Step3: In the third execution getFollowers returned the message had reached the limit of 400k
        Step4: I made a copy of the worksheet and then it performed the function clearSheet to erase the data that had previously downloaded
        Step 5: Ran getLotsOfFriendAndFo, however, limit 400k message back to present, once again ran the function clearSheet and yet the message continued … ?

        Reply
        1. Post author

          Guessing Google doesn't realise the sheet has been emptied. When you get to step 5 and get the 400k message close the spreadsheet and reopen it - getLotsOfFriendAndFo should remember where it was up to

          Reply
          1. Almir Souza

            Martin, could extract here. Thanks again for your help! The tool is amazing!

            Where are you from? And it works with what?

            Hugs!

  33. Sarath

    Hi Martin,

    It is not working for me. Getting error "Oops! exceeded time"

    Also, can you please tell how to export it in excel

    Thanks,
    Sarath

    Reply
  34. pat

    Howdy Martin,

    First off, WOW! This is amazing.

    I'm running into one problem:

    I'm using the "Get other persons or followers" down the Twitter drop-down menu and it queries about 3400 users then returns this error:

    Oops
    The coordinates or dimensions of the range are invalid. (line 323)

    Thoughts?

    Reply
    1. Post author

      So it appears the method for creating new sheets in Google Spreadsheets is currently borked, so I've come up with a workaround that fixes it. Use the original link at the beginning of this post to get version 2.1.2

      Reply
  35. Pingback:

  36. ahmad

    I am also trying to download more than 5000. Everything seems to work except it keeps downloading the same set of 5000 over and over again. I rerun GetLotsOfFriendsAndFo and just keeps downloading the same batch. Hmm. Any suggestions.

    Reply
  37. Pingback:

  38. David Eedle

    This is one of the neatest uses I've seen on Google Docs. I was about to sit down to rite API calls to pull lists of followers for a bunch of Twitter accounts, and instead came across this spreadsheet

    Great work!

    David

    Reply
    1. Hi,

      Please if this worked for you can you tell me how I can lay my hands on this with detailed instructions on how to make use of this?

      I need to get a list of all my followers for my two accounts.

      Thanks

      Reply
  39. Karen O'Rawe

    Hello
    This is probably a silly question but when I try to get other person's followers I get 'This users account is protected. Data is not available' however the Tweets are not protected. I'm guessing that I am missing something obvious. Please could you help me?

    Thanks for a great post - Very useful.
    Karen

    Reply
  40. Pingback:

  41. Pingback:

  42. Pingback:

  43. Pingback:

  44. Morten

    Hey, did you ever fix so you can download more than 5000 tweets? Mine isn't working either, but great job making this, tho :)

    Reply
    1. Post author

      @Morten it should be able to work with over 5000 but you need to configure the getMoreFriendOrFo() function in the script editor - there's documentation on my site somewhere ;-s

      Reply
  45. Pingback:

  46. Pingback:

  47. Pingback:

  48. John

    This is a very helpful tool.

    For my study, I need to have not only the friends and followers of a specific screen name but also the 'friend' and 'follower' connections between those. Does anyone know of a script that will download this type of data from Twitter? I know that Is there a NodeXL provides this option but, unfortunately, it is extremely slow...

    Any help or guidance with this will be greatly appreciated.

    Thanks.

    John

    Reply
  49. Pingback:

  50. Steve

    Hi! When I try to load the Twitter menu, I get an error message Script function onOpen could not be found. Any suggestions? Thanks.

    Reply
      1. Steve

        Yep, did that. More than once. Tried it in IE and Opera using different google accounts and get the same message.

        Reply
  51. Pingback:

  52. abdul

    Thanks for this great tool
    it really helped me a lot in colecting data. However, I've tried get other person follower but the max it could get is 5000 then i tried to do it again for the same person but i couldn't. Plus, i'm afraid even if it did, it'll get the same first 5000 again which wont be very helpful for me.
    could you plz let me know if there's another way around it so i can get all the followers of another person
    again thank you for this powerful tool

    Reply
  53. luis

    Hi,

    I was confused about how to get other kind of data like the other column headers you mentioned. tried changing values in the sheet but got empty results.. so how exactly can one add other columns for the other values?

    Reply
  54. Nina

    Thank you for this!!!

    Help, please. I need to use one of the advanced options but I'm not sure if I'm doing this correctly. I created a new column in the Followers sheet and named the header status_in_reply_to_screen_name . Am I missing something? Cos this method is not working for me.

    Reply
  55. Pingback:

  56. Hi :). Is there a way to run the script again and only add new additions? Rather than adding the entire list again and having duplicates?

    Thank you by the way this has already saved me a TON of hours!

    Reply
  57. charlton

    Hi Martin - a question for you a bit off topic here. Twitter's data column gives a date/time value. Do you know of any easy way to convert that (from Excel) to a time interval such that it can be used for dynamic analysis?

    Many thanks,
    Charlton

    Reply
  58. Norbert Herman

    Hi Martin, your script is awesome and I got it working in the end, but with a little glitch. I suggest you amend the instructions:

    Step 4.5 While in the Script Editor mode, select Run > authenticate

    Step 6.5 Back in the excel file select Twitter > Test Connection - you should get back a message stating "Connected to Twitter Successfully". If you do not get this message, check to make sure you have the call-back URL filled in on our Twitter App Settings - make your call-back URL the same as your website URL even if its a fictitious one for the time being

    Reply
  59. Thank you! I'm also searching for a way to get emails of all my twitter followers. I can create a new landing page, but it will be much time consuming.
    Well thanks!

    Reply
  60. Pingback:

  61. Pingback:

  62. Got some difficulties (wanted to go too fast...) but coming back to the tutorial everything is well documented.
    Did not work in Opera, worked fine in Chrome.
    Awesome result.
    Thanks Martin !

    Reply
  63. Cristian

    The spreadsheet has not retrieved any followers since the migration to the API 1.1. Will an updated version that interacts with the new API be available at some point?
    Thanks a lot for this, it is a great tool!

    Reply
  64. I fixed it - go to script editor and "find" all instances of "/1/" (there should be 2) and "replace" with "1.1". Tada!!!
    jules:)

    Reply
  65. Cristian

    Jules--thanks, I actually noticed that someone has updated the code in the public Google Spreadsheet file. However, I am still having problems getting it back to work. Have you been able to use it and regularly download data in the current version?

    Reply
  66. Jules

    Jules, I think something may have changed. When I run the script, it now says that there are no new users. Did someone change the script on the public spreadsheet.

    Reply
  67. Pingback:

  68. ashwini

    can i get the emails of my followers through some API call? Is that facility availble on twitter? I am urgent need of it.Any way or any link

    Reply
  69. Andrew Gotobed

    In theory Martin would it be possible to create something similar to this, but set it to grab via location? For instance, list all my followers in London UK?

    Reply
  70. Pingback:

  71. Pingback:

  72. rog

    Brilliant stuff, thanks a million!
    Now if only there was some way of making it send DMs - I'm not a spammer, I run the twitter account for a local group and could do with advising our followers of new campaigns a few times a year.

    Reply
  73. I just want to say, thanks a lot man. You script is working like a charm! Now i have my own app on Google drive to analyze my twitter account.
    Thanks again, you rock :)

    Reply
  74. Thanks for this! This is why I love Google Apps... been searching for a way to download a csv file of my followers with no luck & then thought maybe Google Apps? Would it be OK to link back to this article from my blog?

    Reply
  75. charlton mcilwain

    HI Martin. I've used this before you received the Twitter admonition. Glad to see it's Back. Is there still way in the new version to search for Tweets with other search operators - hashtags, keywords, etc.? Or will this only do friends/followers data?

    Many thanks!

    Reply
  76. It looks so nice, but somehow I do something wrong. When I run "authorize" I am running in an error at line 585. Can somebody please explain. I am just doing whats instructed, I do not have experience with these kind of interfaces, but I really looooveee the functionality.

    Reply
  77. Hi I tried to configure the twitter API using the instructions below but it keeps telling me that I have an invalid URL formate to do it...any help would be appreciated! Thanks!

    1. Register for an API key with Twitter at http://dev.twitter.com/apps/new (if you've already registered a Google Spreadsheet/Twitter mashup you can reuse your existing Consumer Key/Consumer Secret). In the form these are the important bits:
    - Application Website = anything you like
    - Application Type = Browser
    - Callback URL = https://spreadsheets.google.com/macros
    - Default Access type = Read-only
    2. Once finished filling in the form and accepting Twitter's terms and conditions you'll see a summary page which includes a Consumer Key and Consumer Secret which you need to enter below
    3. When your Key and Secret are saved you need to open Tools > Script Editor ... and run the 'authenticate' function

    Reply
  78. You are an absolute GENIUS. Thank you so much! Your directions were also tremendously clear for someone like me who knows nothing about scripts or code and super easy to follow. Thanks again!

    Reply
  79. Robin Drew

    This is an awesome app.

    I'm trying to use the 'GetLotsofFriendAndFo' function and I'm running into a problem mentioned above, but I don't see a solution.

    The first time I ran it, it asked for the user etc that I wanted to target. Since then though that same form has not reappeared, so every time I run it it downloads the same users. I'm not even totally convinced that the users it's downloading are of the account I originally put in.

    Any way around this? A way to reset it perhaps, or to see what account it's targetting?

    Reply
  80. Pingback:

  81. dinos

    Hi, good script!
    One question for you: getting the followers of another user (about 9000) i can obtain always the first 5000. Why? there is a way to obtain the remaining followers?

    thanks a lot

    Reply
  82. Kim

    Hi Martin,

    Thanks for providing this! When I try to Run: Authenticate I get this error: OAuth Error (line 585, file "Twitter Script")

    Would love any assistance with this :)

    Cheers,

    Kim

    Reply
  83. Michelle

    Hi, i know that you have to give permission and others can automatically look at your documents- I got up to the point that said run atest and found that two other who were not identifiable had revised the script in that time and also it said the test failed too! Any help ? Slim chance I know. Also any idea of what those people might have done as i was logged in via my personal account!

    Thanks-

    Reply
  84. Pingback:

  85. anon

    Hi. I'm not at all technical but followed your instructions and exported the data that I wanted first time. Thanks v much for building this sheet – much appreciated :)

    Reply

Leave a Reply