{"id":28980,"date":"2015-07-18T11:30:33","date_gmt":"2015-07-18T11:30:33","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=28980"},"modified":"2015-07-18T12:04:04","modified_gmt":"2015-07-18T12:04:04","slug":"how-to-get-json-data-from-facebook-graph-api-in-apex","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/","title":{"rendered":"How to Get JSON Data from Facebook Graph Api in apex"},"content":{"rendered":"<p class=\"p\"><strong><span class=\"ph\">Apex<\/span><\/strong> provides several built-in classes to work with HTTP services and create HTTP requests like GET, POST, PUT, and DELETE.<\/p>\n<p class=\"p\">You can use these HTTP classes to integrate to REST-based services. They also allow you to integrate to SOAP-based web services as an alternate option to generating <span class=\"ph\">Apex<\/span> code from a WSDL.<\/p>\n<p class=\"p\">These classes expose the general HTTP request\/response functionality:<\/p>\n<ul class=\"ul bulletList\">\n<li class=\"li\"><a class=\"xref\" title=\"Use the Http class to initiate an HTTP request and response.\" href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_classes_restful_http_http.htm#apex_classes_restful_http_http\"><span class=\"ph\">Http Class<\/span><\/a>. Use this class to initiate an HTTP request and response.<\/li>\n<li class=\"li\"><a class=\"xref\" title=\"Use the HttpRequest class to programmatically create HTTP requests like GET, POST, PUT, and DELETE.\" href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_classes_restful_http_httprequest.htm#apex_classes_restful_http_httprequest\"><span class=\"ph\">HttpRequest Class<\/span><\/a>: Use this class to programmatically create HTTP requests like GET, POST, PUT, and DELETE.<\/li>\n<li class=\"li\"><a class=\"xref\" title=\"Use the HttpResponse class to handle the HTTP response returned by the Http class.\" href=\"https:\/\/developer.salesforce.com\/docs\/atlas.en-us.apexcode.meta\/apexcode\/apex_classes_restful_http_httpresponse.htm#apex_classes_restful_http_httpresponse\"><span class=\"ph\">HttpResponse Class<\/span><\/a>: Use this class to handle the HTTP response returned by <samp class=\"codeph apex_code\">HTTP<\/samp>.<\/li>\n<\/ul>\n<div class=\"p\">\n<p>The <samp class=\"codeph apex_code\">HttpRequest<\/samp> and <samp class=\"codeph apex_code\">HttpResponse<\/samp> classes support the following elements:<\/p>\n<ul class=\"ul bulletList\">\n<li class=\"li\"><samp class=\"codeph apex_code\">HttpRequest<\/samp>:\n<ul class=\"ul bulletList\">\n<li class=\"li\">HTTP request types such as GET, POST, PUT, DELETE, TRACE, CONNECT, HEAD, and OPTIONS.<\/li>\n<li class=\"li\">Request headers if needed.<\/li>\n<li class=\"li\">Read and connection timeouts.<\/li>\n<li class=\"li\">Redirects if needed.<\/li>\n<li class=\"li\">Content of the message body.<\/li>\n<\/ul>\n<\/li>\n<li class=\"li\"><samp class=\"codeph apex_code\">HttpResponse<\/samp>:\n<ul class=\"ul bulletList\">\n<li class=\"li\">The HTTP status code.<\/li>\n<li class=\"li\">Response headers if needed.<\/li>\n<li class=\"li\">Content of the response body.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<p>The following example shows an HTTP GET request made to the external server specified by the value of url for this\u00a0 <span id=\"j_id0:j_id1:j_id86\">You have to make a HTTP Callout to the URL<\/span><strong><br \/>\n<\/strong><\/p>\n<pre class=\"brush:java\">Http http =new Http();\r\nHttpRequest req =new HttpRequest();\r\nreq.setEndpoint('https:\/\/graph.facebook.com\/webkul?access_token=CAAGIV8ndRDcBALpKhd5t5smOzFMv25HLpgqMqfZBhwZCJMbqPFW4aOZCXphud9tc7w9EEw0vBvRooZB7idLHLK3LkzS0pQP63pysUUZA7We5EV8IqZAsj7WwEhXf97C34aDKyaKW8lyvihyxl2duEpMjuHGs7LlsyPEZAwSJjykSpomgALOdvZBV');\r\nreq.setmethod('GET');\r\nHttpResponse res = http.send(req);\r\nString str = res.getbody();\r\nSystem.debug(str);\r\n<\/pre>\n<pre><strong>Output\r\n<\/strong><\/pre>\n<pre>{\r\n   \"id\": \"285021323071\",\r\n   \"about\": \"https:\/\/store.webkul.com . WebKul Store is the largest collection of open source plugins , we build best marketplace and openERP connectors in the world .\",\r\n   \"awards\": \"Best E-commerce Marketplace \\n\\nBest E-commerce OpenERP connector\",\r\n   \"can_post\": true,\r\n   \"category\": \"Software\",\r\n   \"checkins\": 0,\r\n   \"company_overview\": \"https:\/\/store.webkul.com\/ WebKul Software Private limited is an ISO certified design and development company working on e-commerce and ERP from almost five years .We have served more than 1000+ e-commerce store world-wide and our modules are functioning more than 20000+ store world wide  .We have a very dedicated team on Opencart , Magento and Prestashop . So we understand e-commerce very deeply . We have developed some very complex solutions like from drop-shipping solutions to multi vendor marketplace  With their connection to our ERP programme .\",\r\n   \"cover\": {\r\n      \"cover_id\": \"10153641288963072\",\r\n      \"offset_x\": 0,\r\n      \"offset_y\": 0,\r\n      \"source\": \"https:\/\/scontent.xx.fbcdn.net\/hphotos-xpt1\/v\/t1.0-9\/s720x720\/15772_10153641288963072_644429492176708130_n.png?oh=df373f59bca9f7a26c353051d2940d18&amp;oe=565685DB\",\r\n      \"id\": \"10153641288963072\"\r\n   },\r\n   \"has_added_app\": false,\r\n   \"is_community_page\": false,\r\n   \"is_published\": true,\r\n   \"likes\": 7100,\r\n   \"link\": \"https:\/\/www.facebook.com\/webkul\",\r\n   \"location\": {\r\n      \"city\": \"Noida\",\r\n      \"country\": \"India\",\r\n      \"street\": \"A-67 2nd Floor Sector 63 \",\r\n      \"zip\": \"201301\"\r\n   },\r\n   \"name\": \"WebKul\",\r\n   \"parking\": {\r\n      \"lot\": 0,\r\n      \"street\": 0,\r\n      \"valet\": 0\r\n   },\r\n   \"phone\": \"(+1)408-215-2638 \",\r\n   \"talking_about_count\": 79,\r\n   \"username\": \"webkul\",\r\n   \"website\": \"https:\/\/store.webkul.com\/\",\r\n   \"were_here_count\": 0\r\n}\r\n\r\n<span id=\"j_id0:j_id1:j_id86\"><strong id=\"ext-gen8\" class=\"feedText\"><\/strong><\/span><\/pre>\n<p>&nbsp;<\/p>\n<p>Make sure you add &#8216;https:\/\/graph.facebook.com&#8217; to Remote Site Settings to whitelist the URL.<\/p>\n<p><span id=\"j_id0:j_id1:j_id86\"><strong id=\"ext-gen8\" class=\"feedText\">Refer the below url for tips on parsing in Apex :- <a href=\"http:\/\/json2apex.herokuapp.com\/\">http:\/\/json2apex.herokuapp.com\/<\/a><br \/>\n<\/strong><\/span><\/p>\n<p>&nbsp;<\/p>\n<p>For Parsing in Apex Use the below class<\/p>\n<pre class=\"brush:java\">public class JSON2Apex {\r\n\r\n    public String id;\r\n    public String about;\r\n    public String awards;\r\n    public Boolean can_post;\r\n    public String category;\r\n    public Integer checkins;\r\n    public String company_overview;\r\n    public Cover cover;\r\n    public Boolean has_added_app;\r\n    public Boolean is_community_page;\r\n    public Boolean is_published;\r\n    public Integer likes;\r\n    public String link;\r\n    public Location location;\r\n    public String name;\r\n    public Parking parking;\r\n    public String phone;\r\n    public Integer talking_about_count;\r\n    public String username;\r\n    public String website;\r\n    public Integer were_here_count;\r\n\r\n    public class Parking {\r\n        public Integer lot;\r\n        public Integer street;\r\n        public Integer valet;\r\n    }\r\n\r\n    public class Location {\r\n        public String city;\r\n        public String country;\r\n        public String street;\r\n        public String zip;\r\n    }\r\n\r\n    public class Cover {\r\n        public String cover_id;\r\n        public Integer offset_x;\r\n        public Integer offset_y;\r\n        public String source;\r\n        public String id;\r\n    }\r\n\r\n    \r\n    public static JSON2Apex parse(String json) {\r\n        return (JSON2Apex) System.JSON.deserialize(json, JSON2Apex.class);\r\n    }\r\n    \r\n    }\r\n\r\n<\/pre>\n<p>You can use this class, and deserialize the JSON by<\/p>\n<pre class=\"brush:java\">JSON2Apex myClass = JSON2Apex.parse(str);\r\n<\/pre>\n<p>Now the Full code like this<\/p>\n<pre class=\"brush:java\">Http http =new Http();\r\nHttpRequest req =new HttpRequest();\r\nreq.setEndpoint('https:\/\/graph.facebook.com\/webkul?access_token=CAAGIV8ndRDcBALpKhd5t5smOzFMv25HLpgqMqfZBhwZCJMbqPFW4aOZCXphud9tc7w9EEw0vBvRooZB7idLHLK3LkzS0pQP63pysUUZA7We5EV8IqZAsj7WwEhXf97C34aDKyaKW8lyvihyxl2duEpMjuHGs7LlsyPEZAwSJjykSpomgALOdvZBV');\r\nreq.setmethod('GET');\r\nHttpResponse res = http.send(req);\r\nString str = res.getbody();\r\nSystem.debug(str);\r\n\r\nJSON2Apex myClass = JSON2Apex.parse(str);\r\n\r\nSystem.debug(myClass);\r\n\r\n<\/pre>\n<p>Now, the Output after deserialize the JSON given below<\/p>\n<pre>Best E-commerce OpenERP connector, can_post=true, category=Software, checkins=0, company_overview=https:\/\/store.webkul.com\/ WebKul Software Private limited is an ISO certified design and development company working on e-commerce and ERP from almost five years .We have served more than 1000+ e-commerce store world-wide and our modules are functioning more than 20000+ store world wide  .We have a very dedicated team on Opencart , Magento and Prestashop . So we understand e-commerce very deeply . We have developed some very complex solutions like from drop-shipping solutions to multi vendor marketplace  With their connection to our ERP programme ., cover=Cover:[cover_id=10153641288963072, id=10153641288963072, offset_x=0, offset_y=0, source=https:\/\/scontent.xx.fbcdn.net\/hphotos-xpt1\/v\/t1.0-9\/s720x720\/15772_10153641288963072_644429492176708130_n.png?oh=df373f59bca9f7a26c353051d2940d18&amp;oe=565685DB], has_added_app=false, id=285021323071, is_community_page=false, is_published=true, likes=7100, link=https:\/\/www.facebook.com\/webkul, location=Location:[city=Noida, country=India, street=A-67 2nd Floor Sector 63 , zip=201301], name=WebKul, parking=Parking:[lot=0, street=0, valet=0], phone=(+1)408-215-2638 , talking_about_count=73, username=webkul, website=https:\/\/store.webkul.com\/, were_here_count=0]\r\n<\/pre>\n<p><strong>Note**<\/strong> You can make Facebook Graph url like this :- https:\/\/graph.facebook.com\/YOUR_PAGE_ID?access_token=YOUR_ACCESS_TOKEN<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apex provides several built-in classes to work with HTTP services and create HTTP requests like GET, POST, PUT, and DELETE. You can use these HTTP classes to integrate to REST-based services. They also allow you to integrate to SOAP-based web services as an alternate option to generating Apex code from a WSDL. These classes expose <a href=\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1889,1173,5,1699,1887],"tags":[1884,1518,236,1885],"class_list":["post-28980","post","type-post","status-publish","format-standard","hentry","category-apex","category-api-2","category-facebook","category-facebook-wall-feed","category-salesforce","tag-apex","tag-facebook-api","tag-json","tag-salesforce"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Get JSON Data from Facebook Graph Api in apex<\/title>\n<meta name=\"description\" content=\"How to Get JSON Data from Facebook Graph Api in apex by HTTP GET request made to the external server specified by the value of url\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Get JSON Data from Facebook Graph Api in apex\" \/>\n<meta property=\"og:description\" content=\"How to Get JSON Data from Facebook Graph Api in apex by HTTP GET request made to the external server specified by the value of url\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/ayush.mbd\" \/>\n<meta property=\"article:published_time\" content=\"2015-07-18T11:30:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-18T12:04:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ayush Mittal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/ayushmbd\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ayush Mittal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\"},\"author\":{\"name\":\"Ayush Mittal\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/e40625c367d981fb177b6d91e98d8610\"},\"headline\":\"How to Get JSON Data from Facebook Graph Api in apex\",\"datePublished\":\"2015-07-18T11:30:33+00:00\",\"dateModified\":\"2015-07-18T12:04:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\"},\"wordCount\":287,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"keywords\":[\"Apex\",\"facebook api\",\"json\",\"Salesforce\"],\"articleSection\":[\"Apex\",\"API\",\"Facebook\",\"Facebook Wall Feed\",\"Salesforce\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\",\"url\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\",\"name\":\"How to Get JSON Data from Facebook Graph Api in apex\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2015-07-18T11:30:33+00:00\",\"dateModified\":\"2015-07-18T12:04:04+00:00\",\"description\":\"How to Get JSON Data from Facebook Graph Api in apex by HTTP GET request made to the external server specified by the value of url\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Get JSON Data from Facebook Graph Api in apex\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/e40625c367d981fb177b6d91e98d8610\",\"name\":\"Ayush Mittal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1a287220ee7e0460b4490bfe2145f413f5cbd4459dcb31b3ebe46b90f8055a48?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1a287220ee7e0460b4490bfe2145f413f5cbd4459dcb31b3ebe46b90f8055a48?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ayush Mittal\"},\"sameAs\":[\"http:\/\/webkul.com\",\"https:\/\/www.facebook.com\/ayush.mbd\",\"https:\/\/x.com\/https:\/\/twitter.com\/ayushmbd\"],\"url\":\"https:\/\/webkul.com\/blog\/author\/ayush\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Get JSON Data from Facebook Graph Api in apex","description":"How to Get JSON Data from Facebook Graph Api in apex by HTTP GET request made to the external server specified by the value of url","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/","og_locale":"en_US","og_type":"article","og_title":"How to Get JSON Data from Facebook Graph Api in apex","og_description":"How to Get JSON Data from Facebook Graph Api in apex by HTTP GET request made to the external server specified by the value of url","og_url":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_author":"https:\/\/www.facebook.com\/ayush.mbd","article_published_time":"2015-07-18T11:30:33+00:00","article_modified_time":"2015-07-18T12:04:04+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png","type":"image\/png"}],"author":"Ayush Mittal","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/ayushmbd","twitter_site":"@webkul","twitter_misc":{"Written by":"Ayush Mittal","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/"},"author":{"name":"Ayush Mittal","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/e40625c367d981fb177b6d91e98d8610"},"headline":"How to Get JSON Data from Facebook Graph Api in apex","datePublished":"2015-07-18T11:30:33+00:00","dateModified":"2015-07-18T12:04:04+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/"},"wordCount":287,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"keywords":["Apex","facebook api","json","Salesforce"],"articleSection":["Apex","API","Facebook","Facebook Wall Feed","Salesforce"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/","url":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/","name":"How to Get JSON Data from Facebook Graph Api in apex","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2015-07-18T11:30:33+00:00","dateModified":"2015-07-18T12:04:04+00:00","description":"How to Get JSON Data from Facebook Graph Api in apex by HTTP GET request made to the external server specified by the value of url","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/how-to-get-json-data-from-facebook-graph-api-in-apex\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Get JSON Data from Facebook Graph Api in apex"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/e40625c367d981fb177b6d91e98d8610","name":"Ayush Mittal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1a287220ee7e0460b4490bfe2145f413f5cbd4459dcb31b3ebe46b90f8055a48?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1a287220ee7e0460b4490bfe2145f413f5cbd4459dcb31b3ebe46b90f8055a48?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ayush Mittal"},"sameAs":["http:\/\/webkul.com","https:\/\/www.facebook.com\/ayush.mbd","https:\/\/x.com\/https:\/\/twitter.com\/ayushmbd"],"url":"https:\/\/webkul.com\/blog\/author\/ayush\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/28980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=28980"}],"version-history":[{"count":9,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/28980\/revisions"}],"predecessor-version":[{"id":28989,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/28980\/revisions\/28989"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=28980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=28980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=28980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}