Apps Script‎ > ‎

Twitter Timeline

        Getting a Twitter timeline to appear in Google Sites is notoriously difficult. I got tired of trying to fix it every time it stopped working, so I wrote a gadget to embed a timeline into a sites page.

        To use it, you'll need to visit your twitter page and create a widget. It's not as complicated as it sounds, and you can get started at https://twitter.com/settings/widgets, or do a quick search on how to create a widget.

        Once you've got it created, you'll need to keep that tab handy, because you'll need the widget ID. That can be found in the URL of the actual widget itself. For example, if the address bar shows https://twitter.com/settings/widgets/12345678901234567890/edit, then your widget ID is 12345678901234567890.

        In your google site, click the edit button on the page, and choose Insert - Gadgets - ... More Gadgets... and choose to insert from a URL. Copy and paste this address into the address bar:

http://www.opensourceteacher.ca/Twitter_Timeline.xml

        Then, in the configuration, type in your twitter handle (don't include the @ symbol, though), and the widget ID. You can then click the preview button to see what it will look like, and customize it to your liking. Any changes you make on the Twitter Widget Configuration page (for example, if you want to switch the theme from light to dark) will be reflected in the embedded version in your site.

        For those who are interested, here's the source code, hosted on Gist.

The gadget spec URL could not be found