{"id":1467,"date":"2011-01-17T11:56:40","date_gmt":"2011-01-17T16:56:40","guid":{"rendered":"http:\/\/www.jamesg.net\/?p=1467"},"modified":"2011-01-19T17:05:49","modified_gmt":"2011-01-19T22:05:49","slug":"learning-the-facebook-graph-api","status":"publish","type":"post","link":"https:\/\/jamesg.net\/?p=1467","title":{"rendered":"Learning the Facebook Graph API"},"content":{"rendered":"<p>Earlier this month, I was approached by a software company  to assist writing a <a href=\"http:\/\/www.facebook.com\" target=\"_blank\">Facebook<\/a> application.\u00a0  I hadn\u2019t done this, however I have read about their powerful <a href=\"http:\/\/developers.facebook.com\/docs\/reference\/api\/user\/\" target=\"_blank\">Graph API<\/a> and was anxious to give it a shot.  The first step was to learn to connect to the facebook API, which was greatly assisted by using the <a href=\"https:\/\/github.com\/facebook\/php-sdk\/\" target=\"_blank\">PHP SDK<\/a> that has been written and released as open source. I&#8217;ll write a longer blog soon once I develop the application, but here&#8217;s the steps to begin writing your own external facebook application.<\/p>\n<ol>\n<li>Register your facebook application ( <a href=\"http:\/\/developers.facebook.com\/setup\/\" target=\"_blank\">link<\/a> )<\/li>\n<li>Download the Facebook PHP SDK (<a href=\"https:\/\/github.com\/facebook\/php-sdk\/tree\/master\/src\" target=\"_blank\">link<\/a>)<\/li>\n<li>Read tutorials to learn the basics (<a href=\"http:\/\/thinkdiff.net\/facebook\/graph-api-javascript-base-facebook-connect-tutorial\/\" target=\"_blank\">click here for a good one<\/a>)<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Earlier this month, I was approached by a software company to assist writing a Facebook application.\u00a0 I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[221,220,264],"class_list":["post-1467","post","type-post","status-publish","format-standard","hentry","category-technology-and-programming","tag-api","tag-facebook","tag-programming"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"James Garrett\"\/>\n\t<meta name=\"keywords\" content=\"api,facebook,programming,technology &amp; programming\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/jamesg.net\/?p=1467\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"James Garrett&#039;s Blog | Software developer passionate about all things computer science, nature, and travel\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Learning the Facebook Graph API | James Garrett&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/jamesg.net\/?p=1467\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2011-01-17T16:56:40+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-01-19T22:05:49+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Learning the Facebook Graph API | James Garrett&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#article\",\"name\":\"Learning the Facebook Graph API | James Garrett's Blog\",\"headline\":\"Learning the Facebook Graph API\",\"author\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/?author=1#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dcc0cae12f663ca123ac5342af5dbcf38c469405e0fb3d5f59984199cdb04243?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"James Garrett\"},\"datePublished\":\"2011-01-17T11:56:40-05:00\",\"dateModified\":\"2011-01-19T17:05:49-05:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#webpage\"},\"articleSection\":\"Technology &amp; Programming, API, Facebook, Programming\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/jamesg.net\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?cat=6#listItem\",\"name\":\"Technology &amp; Programming\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?cat=6#listItem\",\"position\":2,\"name\":\"Technology &amp; Programming\",\"item\":\"https:\\\/\\\/jamesg.net\\\/?cat=6\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#listItem\",\"name\":\"Learning the Facebook Graph API\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#listItem\",\"position\":3,\"name\":\"Learning the Facebook Graph API\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?cat=6#listItem\",\"name\":\"Technology &amp; Programming\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/#person\",\"name\":\"James Garrett\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dcc0cae12f663ca123ac5342af5dbcf38c469405e0fb3d5f59984199cdb04243?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"James Garrett\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?author=1#author\",\"url\":\"https:\\\/\\\/jamesg.net\\\/?author=1\",\"name\":\"James Garrett\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/dcc0cae12f663ca123ac5342af5dbcf38c469405e0fb3d5f59984199cdb04243?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"James Garrett\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#webpage\",\"url\":\"https:\\\/\\\/jamesg.net\\\/?p=1467\",\"name\":\"Learning the Facebook Graph API | James Garrett's Blog\",\"description\":\"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/?p=1467#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/?author=1#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/?author=1#author\"},\"datePublished\":\"2011-01-17T11:56:40-05:00\",\"dateModified\":\"2011-01-19T17:05:49-05:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/jamesg.net\\\/#website\",\"url\":\"https:\\\/\\\/jamesg.net\\\/\",\"name\":\"James Garrett's Blog\",\"description\":\"Software developer passionate about all things computer science, nature, and travel\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/jamesg.net\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Learning the Facebook Graph API | James Garrett's Blog","description":"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using","canonical_url":"https:\/\/jamesg.net\/?p=1467","robots":"max-image-preview:large","keywords":"api,facebook,programming,technology &amp; programming","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jamesg.net\/?p=1467#article","name":"Learning the Facebook Graph API | James Garrett's Blog","headline":"Learning the Facebook Graph API","author":{"@id":"https:\/\/jamesg.net\/?author=1#author"},"publisher":{"@id":"https:\/\/jamesg.net\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/jamesg.net\/?p=1467#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/dcc0cae12f663ca123ac5342af5dbcf38c469405e0fb3d5f59984199cdb04243?s=96&d=mm&r=g","width":96,"height":96,"caption":"James Garrett"},"datePublished":"2011-01-17T11:56:40-05:00","dateModified":"2011-01-19T17:05:49-05:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/jamesg.net\/?p=1467#webpage"},"isPartOf":{"@id":"https:\/\/jamesg.net\/?p=1467#webpage"},"articleSection":"Technology &amp; Programming, API, Facebook, Programming"},{"@type":"BreadcrumbList","@id":"https:\/\/jamesg.net\/?p=1467#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/jamesg.net#listItem","position":1,"name":"Home","item":"https:\/\/jamesg.net","nextItem":{"@type":"ListItem","@id":"https:\/\/jamesg.net\/?cat=6#listItem","name":"Technology &amp; Programming"}},{"@type":"ListItem","@id":"https:\/\/jamesg.net\/?cat=6#listItem","position":2,"name":"Technology &amp; Programming","item":"https:\/\/jamesg.net\/?cat=6","nextItem":{"@type":"ListItem","@id":"https:\/\/jamesg.net\/?p=1467#listItem","name":"Learning the Facebook Graph API"},"previousItem":{"@type":"ListItem","@id":"https:\/\/jamesg.net#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/jamesg.net\/?p=1467#listItem","position":3,"name":"Learning the Facebook Graph API","previousItem":{"@type":"ListItem","@id":"https:\/\/jamesg.net\/?cat=6#listItem","name":"Technology &amp; Programming"}}]},{"@type":"Person","@id":"https:\/\/jamesg.net\/#person","name":"James Garrett","image":{"@type":"ImageObject","@id":"https:\/\/jamesg.net\/?p=1467#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/dcc0cae12f663ca123ac5342af5dbcf38c469405e0fb3d5f59984199cdb04243?s=96&d=mm&r=g","width":96,"height":96,"caption":"James Garrett"}},{"@type":"Person","@id":"https:\/\/jamesg.net\/?author=1#author","url":"https:\/\/jamesg.net\/?author=1","name":"James Garrett","image":{"@type":"ImageObject","@id":"https:\/\/jamesg.net\/?p=1467#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/dcc0cae12f663ca123ac5342af5dbcf38c469405e0fb3d5f59984199cdb04243?s=96&d=mm&r=g","width":96,"height":96,"caption":"James Garrett"}},{"@type":"WebPage","@id":"https:\/\/jamesg.net\/?p=1467#webpage","url":"https:\/\/jamesg.net\/?p=1467","name":"Learning the Facebook Graph API | James Garrett's Blog","description":"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/jamesg.net\/#website"},"breadcrumb":{"@id":"https:\/\/jamesg.net\/?p=1467#breadcrumblist"},"author":{"@id":"https:\/\/jamesg.net\/?author=1#author"},"creator":{"@id":"https:\/\/jamesg.net\/?author=1#author"},"datePublished":"2011-01-17T11:56:40-05:00","dateModified":"2011-01-19T17:05:49-05:00"},{"@type":"WebSite","@id":"https:\/\/jamesg.net\/#website","url":"https:\/\/jamesg.net\/","name":"James Garrett's Blog","description":"Software developer passionate about all things computer science, nature, and travel","inLanguage":"en-US","publisher":{"@id":"https:\/\/jamesg.net\/#person"}}]},"og:locale":"en_US","og:site_name":"James Garrett's Blog | Software developer passionate about all things computer science, nature, and travel","og:type":"article","og:title":"Learning the Facebook Graph API | James Garrett's Blog","og:description":"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using","og:url":"https:\/\/jamesg.net\/?p=1467","article:published_time":"2011-01-17T16:56:40+00:00","article:modified_time":"2011-01-19T22:05:49+00:00","twitter:card":"summary","twitter:title":"Learning the Facebook Graph API | James Garrett's Blog","twitter:description":"Earlier this month, I was approached by a software company to assist writing a Facebook application. I hadn\u2019t done this, however I have read about their powerful Graph API and was anxious to give it a shot. The first step was to learn to connect to the facebook API, which was greatly assisted by using"},"aioseo_meta_data":{"post_id":"1467","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[],"defaultGraph":"","defaultPostTypeGraph":""},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2020-12-24 13:48:44","updated":"2025-06-07 03:17:48","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jamesg.net\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/jamesg.net\/?cat=6\" title=\"Technology &amp; Programming\">Technology &amp; Programming<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tLearning the Facebook Graph API\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/jamesg.net"},{"label":"Technology &amp; Programming","link":"https:\/\/jamesg.net\/?cat=6"},{"label":"Learning the Facebook Graph API","link":"https:\/\/jamesg.net\/?p=1467"}],"_links":{"self":[{"href":"https:\/\/jamesg.net\/index.php?rest_route=\/wp\/v2\/posts\/1467","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jamesg.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jamesg.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jamesg.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jamesg.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1467"}],"version-history":[{"count":2,"href":"https:\/\/jamesg.net\/index.php?rest_route=\/wp\/v2\/posts\/1467\/revisions"}],"predecessor-version":[{"id":1479,"href":"https:\/\/jamesg.net\/index.php?rest_route=\/wp\/v2\/posts\/1467\/revisions\/1479"}],"wp:attachment":[{"href":"https:\/\/jamesg.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jamesg.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jamesg.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}