Tweet, tweet, twitter feed - Task 8

Introduction

Finally, I have reached the last task in the series and I am ending it with an outdated Twitter widget! Using the 1.0 Twitter API adjacent with jQuery, I was tasked to retrieve five tweets with the getJSON() function.


Work

Thanks to the tremendous power of jQuery I managed to create a tiny Twitter widget that retrieves five tweets from the supplied username in fewer than 6 lines of code. Even though I cannot show you the code I will explain it in detail.

https://api.twitter.com/1/statuses/user_timeline.json?screen_name=[USERNAME]&count=5&callback=?

With the above url and jQuery's getJSON() function, I then retrieved each tweet as a data object that in turn got extracted and placed in an article tag displayed within the '.tweets' section tag. See very simple :)

Twitter widget using API 1.0
Twitter widget using API 1.0