Hopefully this benefits others with the same problem.
Displaying your Twitter tweets on your Google Sites website is difficult!
Google Sites filters your HTML code and doesn't allow you to add your own JavaScript code, therefore restricting you from adding any of the many existing Twitter widgets that exist today, including Twitter's very own.
The Google Gadgets directory contains a Twitter gadget called Twit. This is the gadget I was using in the past.
It uses http
but Google Sites uses https
, therefore this gadget is considered as insecure content and is not displayed by default on certain browsers (e.g. Chrome browser). Instead the user is asked if they want to display insecure content and are recommended not to. Now your visitors will think your site hosts malicious content and they can't easily read your tweets.
Here is my solution, use your own gadget!
To add a gadget to your Google Site, you need to host it yourself or host it on the Google Gadget Directory.
The latter option is preferred and is explained in these steps.
- Host your gadget
- Open Google Gadget Editor (GGE).
- Using GGE, copy & paste the file twitter.xml (shown below) into the editor.
- Select
File
>Save As
and name ittwitter.xml
. - Add the gadget to a page on your Google Site
- Edit a page and click on the spot where you want to add the gadget.
- Go to
Insert
>More gadgets...
>Add gadget by URL
- Paste the URL where your gadget is hosted.
If you used GGE, copy the URL from the filename link in the upper right corner of the editor. - Configure your gadget
- Once your gadget has been added to your page, go to the configuration settings.
- Click on the gadget in edit mode then click on the cog icon.
- Customize the gadget
- Modify the settings to your preferences.
- Don't forget to use your Twitter username!
-
You're free to customize this gadget any way you like.
For example, to change the number of latest tweets shown (default is 12), search forrpp
and change the value. -
Thanks to the folks over at this discussion for doing most of the work!
I basically took their instructions, modified them, and presented them in an easy to read format.