Search Twitter with Google Apps Script

The Twitter Search Archiver uses the OAuth1 library for Google Apps Script to talk to the Twitter Search API. You need to include the OAuth1 library in your Google Script project, create a Callback URL and then call the authorization URL in a separate browser tab to authorize the Twitter service.

However, if you are only going to make read-only requests to Twitter – like fetching user timelines for Twitter RSS feeds or performing searches – you can do without the library as well. You won’t be able to post tweets or DMs though.

Twitter supports application-only authentication giving apps the ability to issue authenticated requests on behalf of the application itself without authenticating the specific user.

First create a new Twitter app and make a note of the Twitter consumer key and consumer secret. The Callback URL can be left blank since it is not required.