O'Reilly logo

Instant jQuery Boilerplate for Plugins by Jonathan Fielding

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a simple JSON reader (Simple)

Now that we have learnt the basics of writing a plugin, we will look at how to write a plugin that can read and process data provided by a JSON feed. For this example, we will be using a feed provided by Twitter for all of our recent tweets.

Getting ready

In preparation for writing this plugin, we need to have a good idea of how our JSON reader plugin is going to work. The JSON reader will work by loading the Twitter feed for a particular user from the Twitter REST API. Version 1.1 of the Twitter REST API requires you to authenticate to retrieve tweets so we will use Yahoo Query Language (YQL) to retrieve the tweets. The plugin will then need to loop through each of the individual posts from the user's Twitter ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required