How to create Tweets stack or twitter feeds

If you heard of tweet stack or twitter feeds you might have already tried third party plugins to display your twitter feed in your blogs and websites.
What I have discussed below is another plugin or precisely a code snippet that is light and does not cause much burden to your server to pull your latest tweets.

 

Idea is to create a client side script and get the tweets so that your actual server is not get slow down by making request to twitter and waiting for tweets.
Thankfully twitter have already created api kind of stuff which helps to pull latest tweets with little client side scripting.

<ul id=”twitter_update_list”></ul>
<script type=”text/javascript” src=”http://twitter.com/javascripts/blogger.js”></script>
<script type=”text/javascript” src=”http://api.twitter.com/1/statuses/user_timeline/shakthydoss.json?callback=twitterCallback2&count=5″></script>

Copy & past the above three lines and replace shakthydoss.json to your username.json. Thats it, above three lines would do what you are looking for. And What is happening here is, from your website you are invoking a twitter function to pull the latest tweets in json format. After pulling control is transferred to another function which parse the json data and return html format of tweets to your website.
Finally its your turn to customize the look and feel of tweets that you gonna to display.

I have tried and implemented the tweet stack on home my page along with little customization on look and feel, now you go head and try your best and share your ideas and views in the comment section.

 


Post a Comment

Your email is never published nor shared. Required fields are marked *