- View the source code here
- Go to File -> Make a Copy and give is a nice friendly name.
- Select the
TwitterService.gsfile from the list on the left. - Copy the big long string that occurs
https://script.google.com/macros/d/[ HERE ]/edit?usp=drive_weband paste it into theprojectKeyfield replacing the value already there. - Go to https://apps.twitter.com and register a new app. There's no need to enter a valid callback URL, but you should set one. I used
http://localhost/foo. Set the permissions to read-only, just to be safe. Take note of the consumer key and secret. - Go to https://github.com/settings/applications/new and register a new OAuth app. Copy the entire URL in step 4 and replace
edit?usp=drive_webwithcallbackand use this as the OAuth callback URL. Save your application and take note of the Client ID and Client Secret. - Back on Google, go to File -> Project properties -> Script properties and add the following keys:
tw_consumerKey = [the Twitter consumer key from step 3]
tw_consumerSecret = [the Twitter consumer secret from step 3]
git_clientId = [the GitHub client ID from step 4]
git_clientSecret = [the GitHub client secret from step 4]
Click Save.
- Go to Publish -> Deploy as web app, enter all the details and copy the URL.
- Open this URL in a new tab and follow the instructions to set it all up.
I discovered this functionality and repo etc when I stumbled upon https://mashe.hawksey.info/2016/08/keeping-your-twitter-archive-fresh-and-freely-hosted-on-github-pages/ whilst disappearing down a rabbit hole completely unrelated.