var jasonData = UrlFetchApp.fetch("http://graph.facebook.com/"+url);
var object = Utilities.jsonParse(jasonData.getContentText());
Like these Classes i need to include in my code and use it. How can i do this?
Google Apps Script is a server side scripting language just like PHP. You can not mix these two. PHP already has functions for fetching url (i.e load(url, options)
) and for parsing json (i.e json_decode).
Check here for all available functions etc in PHP
You can only use these specific functions in your Apps Script code written on https://script.google.com. If you need to access Google APIs in JavaScript or PHP here are your options: