{"id":111896,"date":"2021-03-08T12:54:45","date_gmt":"2021-03-08T07:24:45","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?page_id=111896"},"modified":"2024-04-12T14:31:39","modified_gmt":"2024-04-12T09:01:39","slug":"sdk-api-reference","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/","title":{"rendered":"SDK API Reference"},"content":{"rendered":"\n<p>Below is the API reference for the Facebook SDK for PHP.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Core API<\/h4>\n\n\n\n<p>These classes are at the core of the Facebook SDK for PHP.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\Facebook<\/td><td>The main service object that helps tie all the SDK components together.<\/td><\/tr><tr><td>Facebook\\FacebookApp<\/td><td>An entity that represents a Facebook app and is required to send requests to Graph.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Authentication<\/h4>\n\n\n\n<p>These classes facilitate authenticating a Facebook user with OAuth 2.0.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\Helpers\\FacebookRedirectLoginHelper<\/td><td>An OAuth 2.0 service to obtain a user access token from a redirect using a &#8220;Log in with Facebook&#8221; link.<\/td><\/tr><tr><td>Facebook\\Authentication\\AccessToken<\/td><td>An entity that represents an access token.<\/td><\/tr><tr><td>Facebook\\Authentication\\AccessTokenMetadata<\/td><td>An entity that represents metadata from an access token.<\/td><\/tr><tr><td>Facebook\\Authentication\\OAuth2Client<\/td><td>An OAuth 2.0 client that sends and receives HTTP requests related to user authentication.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Requests and Responses<\/h4>\n\n\n\n<p>These classes are used in a Graph API request\/response cycle.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\FacebookRequest<\/td><td>An entity that represents an HTTP request to be sent to Graph.<\/td><\/tr><tr><td>Facebook\\FacebookResponse<\/td><td>An entity that represents an HTTP response from Graph.<\/td><\/tr><tr><td>Facebook\\FacebookBatchRequest<\/td><td>An entity that represents an HTTP batch request to be sent to Graph.<\/td><\/tr><tr><td>Facebook\\FacebookBatchResponse<\/td><td>An entity that represents an HTTP response from Graph after sending a batch request.<\/td><\/tr><tr><td>Facebook\\FacebookClient<\/td><td>A service object that sends HTTP requests and receives HTTP responses to and from the Graph API.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Signed Requests<\/h4>\n\n\n\n<p>Classes to help obtain and manage signed requests.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\Helpers\\FacebookJavaScriptHelper<\/td><td>Used to obtain an access token or signed request from the cookie set by the JavaScript SDK.<\/td><\/tr><tr><td>Facebook\\Helpers\\FacebookCanvasHelper<\/td><td>Used to obtain an access token or signed request from within the context of an app canvas.<\/td><\/tr><tr><td>Facebook\\Helpers\\FacebookPageTabHelper<\/td><td>Used to obtain an access token or signed request from within the context of a page tab.<\/td><\/tr><tr><td>Facebook\\SignedRequest<\/td><td>An entity that represents a signed request.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Core Exceptions<\/h4>\n\n\n\n<p>These are the core exceptions that the SDK will throw when an error occurs.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\Exceptions\\FacebookSDKException<\/td><td>The base exception to all exceptions thrown by the SDK. Thrown when there is a non-Graph-response-related error.<\/td><\/tr><tr><td>Facebook\\Exceptions\\FacebookResponseException<\/td><td>The base exception to all Graph error responses. This exception is never thrown directly.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Graph Nodes and Edges<\/h4>\n\n\n\n<p>Graph nodes are collections that represent nodes returned by the Graph API. And Graph edges are a collection of nodes returned from an edge on the Graph API.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\GraphNodes\\GraphNode<\/td><td>The base collection object that represents a generic node.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphEdge<\/td><td>A collection of GraphNode&#8217;s with special methods to help paginate over the edge.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphAchievement<\/td><td>A collection that represents an Achievement node.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphAlbum<\/td><td>A collection that represents an Album node.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphLocation<\/td><td>A collection that represents a Location node.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphPage<\/td><td>A collection that represents a Page node.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphPicture<\/td><td>A collection that represents a Picture node.<\/td><\/tr><tr><td>Facebook\\GraphNodes\\GraphUser<\/td><td>A collection that represents a User node.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">File Uploads<\/h4>\n\n\n\n<p>These are entities that represent files to be uploaded with a Graph request.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Class name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\FileUpload\\FacebookFile<\/td><td>Represents a generic file to be uploaded to the Graph API.<\/td><\/tr><tr><td>Facebook\\FileUpload\\FacebookVideo<\/td><td>Represents a video file to be uploaded to the Graph API.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Extensibility<\/h4>\n\n\n\n<p>You can overwrite certain functionality of the SDK by coding to an interface and injecting an instance of your custom functionality.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><td><strong>Interface name<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><\/thead><tbody><tr><td>Facebook\\HttpClients\\ FacebookHttpClientInterface<\/td><td>An interface to code your own HTTP client implementation.<\/td><\/tr><tr><td>Facebook\\Http\\GraphRawResponse<\/td><td>An entity that is returned from an instance of a FacebookHttpClientInterface that represents a raw HTTP response from the Graph API.<\/td><\/tr><tr><td>Facebook\\PersistentData\\PersistentDataInterface<\/td><td>An interface to code your own persistent data storage implementation.<\/td><\/tr><tr><td>Facebook\\Url\\UrlDetectionInterface<\/td><td>An interface to code your own URL detection logic.<\/td><\/tr><tr><td>Facebook\\PseudoRandomString\\ PseudoRandomStringGeneratorInterface<\/td><td>An interface to code your own cryptographically secure pseudo-random string generator.<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Below is the API reference for the Facebook SDK for PHP. Core API These classes are at the core of the Facebook SDK for PHP. Class name Description Facebook\\Facebook The main service object that helps tie all the SDK components together. Facebook\\FacebookApp An entity that represents a Facebook app and is required to send requests&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-111896","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SDK API Reference - Tutorial<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SDK API Reference - Tutorial\" \/>\n<meta property=\"og:description\" content=\"Below is the API reference for the Facebook SDK for PHP. Core API These classes are at the core of the Facebook SDK for PHP. Class name Description FacebookFacebook The main service object that helps tie all the SDK components together. FacebookFacebookApp An entity that represents a Facebook app and is required to send requests...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/\" \/>\n<meta property=\"og:site_name\" content=\"Tutorial\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/vskills.in\/\" \/>\n<meta property=\"article:modified_time\" content=\"2024-04-12T09:01:39+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/\",\"name\":\"SDK API Reference - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2021-03-08T07:24:45+00:00\",\"dateModified\":\"2024-04-12T09:01:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SDK API Reference\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"name\":\"Tutorial\",\"description\":\"Vskills - A initiative in elearning and certification\",\"publisher\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#organization\",\"name\":\"Vskills\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"contentUrl\":\"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg\",\"width\":73,\"height\":55,\"caption\":\"Vskills\"},\"image\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/vskills.in\/\",\"https:\/\/x.com\/vskills_in\",\"https:\/\/www.linkedin.com\/company-beta\/1371554\/\",\"https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SDK API Reference - Tutorial","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:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/","og_locale":"en_US","og_type":"article","og_title":"SDK API Reference - Tutorial","og_description":"Below is the API reference for the Facebook SDK for PHP. Core API These classes are at the core of the Facebook SDK for PHP. Class name Description FacebookFacebook The main service object that helps tie all the SDK components together. FacebookFacebookApp An entity that represents a Facebook app and is required to send requests...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T09:01:39+00:00","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/","name":"SDK API Reference - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2021-03-08T07:24:45+00:00","dateModified":"2024-04-12T09:01:39+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/sdk-api-reference\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"SDK API Reference"}]},{"@type":"WebSite","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","name":"Tutorial","description":"Vskills - A initiative in elearning and certification","publisher":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.vskills.in\/certification\/tutorial\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#organization","name":"Vskills","url":"https:\/\/www.vskills.in\/certification\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","contentUrl":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-content\/uploads\/2017\/07\/vskills-min-logo.jpg","width":73,"height":55,"caption":"Vskills"},"image":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/vskills.in\/","https:\/\/x.com\/vskills_in","https:\/\/www.linkedin.com\/company-beta\/1371554\/","https:\/\/www.youtube.com\/channel\/UCMWnscxPwRF_PqXo9B7q_Tw"]}]}},"_links":{"self":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/111896","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/comments?post=111896"}],"version-history":[{"count":1,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/111896\/revisions"}],"predecessor-version":[{"id":111897,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/111896\/revisions\/111897"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=111896"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=111896"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=111896"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}