INTRO to jQUERY’s .getJSON() FUNCTION – Super Simple Javascript/jQuery Tutorials

FACEBOOK – http://facebook.com/codecascade
TWITTER – http://twitter.com/codecascade

Want to start building mobile user interfaces? More than likely you’ll want to pull JSON data from popular sources like Facebook Graph, Twitter API, or Google Data Protocol. jQuery has the solution for retrieving JSON data with the getjson() function.

This video covers the ABSOLUTE BASICS of using jQuery’s getJSON() function to retrieve JSON formated data across domains from API endpoints like Facebook’s Graph API to help you start building mobile user interfaces today!

JS code from video:

$(document).ready(function() {

$.getJSON(‘https://graph.facebook.com/zombies’, function(fbResults) {

document.write(fbResults.name);

});

}

JSON examples in video: https://graph.facebook.com/zombies

Additional Resources:

“Facebook Graph API Reference”
http://developers.facebook.com/docs/reference/api/

“Using JSON in the Google Data Protocol”
https://developers.google.com/gdata/docs/json

Post Author: hatefull