*Note: oAuthConfig has been deprecated, so this code no longer works. If you want to use it, you'll need to update it to use the oAuth1.0 Library to authenticate with your Twitter app. I've decided to post the code below. Note that if you wish to use the code, you will need to provide a public and private key to your own Twitter app. You can create one for free by visiting dev.twitter.com/apps. Finally, one piece of this puzzle is the oAuthConfig service, used to authenticate between Google Apps and Twitter. This has been deprecated, and will eventually stop working. It would be a better idea to use the oAuth 1.0 Library for Google Apps Script. There has been some confusion about oAuth 1.0 or oAuth 2.0, so let me clear it up by writing my understanding here: oAuth 1.0 is no longer supported for Google services. That means that if you want to connect from Apps Script to any external services, you'll need to use oAuth 2.0. However, Twitter's API still uses oAuth 1, so there's no need to worry about updating or modifying code that relies on oAuth 1.0 until Twitter decides to move to 2.0. Better? No? That's okay, it's really not that clear. If you want to use Apps Script with Twitter, use oAuth 1.0. |
Apps Script >