Technical Details

This approach uses the Twitter User Timeline API to pull in the latest tweet as a JSON object. A function in the blogger.js script is then used to parse the JSON and insert it into the twitter_update_list element.

Add some CSS magic to the twitter div and you have a very easy, client side solution for pulling, parsing and then publishing your latest tweet.

Include Retweets

Notice the include_rts=true parameter being sent to the user_timeline.json script?

That tells twitter to include retweets. Without it, you’ll end up with an empty value when your latest tweet is a retweet.

Further Reading

Special thanks to Isabella Snow and Blogger Buster for their articles. They refer to the old Twitter API but still provide a great starting point.