{"id":111961,"date":"2021-03-08T15:41:49","date_gmt":"2021-03-08T10:11:49","guid":{"rendered":"https:\/\/www.vskills.in\/certification\/tutorial\/?page_id=111961"},"modified":"2024-04-12T14:31:41","modified_gmt":"2024-04-12T09:01:41","slug":"facebook-app-for-your-page","status":"publish","type":"page","link":"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/","title":{"rendered":"Facebook App For Your Page"},"content":{"rendered":"\n<p>You want to create a Facebook App, but don\u2019t know where to start? Or you have heard about Facebook Apps, but don\u2019t even know what they are. Facebook Apps are everywhere on the site, and most of the more common ones are actually written by Facebook\u2019s own developers. Photos, Events, and many other \u201ccore\u201d features of Facebook are actually separate apps. And there are thousands of other third-party apps available for installation into your personal Facebook account.<\/p>\n\n\n\n<p>To get started, you must have a Facebook account. Use your personal Facebook account to create a Facebook page for your business or organization. Your personal information is safe and does not get tied to the page if you don\u2019t want the \u201ccreator\u201d to be known publicly, but Facebook insists on all pages being created by people and not from the companies themselves from the get-go.<\/p>\n\n\n\n<p>The first step in writing an App is getting an App. With your existing Facebook account, add the Developer application to your Facebook profile and then click \u201cSet Up New Application\u201d. Then simply get through the tasks of naming it, agreeing to some standard Terms of Service, and upload an image for its logo (You can change it later).<\/p>\n\n\n\n<p>You don\u2019t have to be a \u201cgeek\u201d for writing basic Facebook Applications. You will need some very basic knowledge of web programming languages and some free space on a web server where you\u2019ll host your Facebook app, which will be written as simple PHP files. MySQL is a very popular open source database management system for running the PHP scripts you\u2019ll need to write. Don\u2019t worry what PHP stands for, as it\u2019s original name is no longer valid and it now stands for something that begins with PHP itself. Recursive acronyms are a common joke among programmers. Other than PHP: Hypertext Preprocessor some other common ones you may have seen before are GNU&#8217;s Not Unix and PNG&#8217;s Not GIF.<\/p>\n\n\n\n<p>From the Application settings, choose Canvas and set HTML as the rendering method. You may have heard of FBML (Facebook Markup Language, as opposed to Hyper Text Markup Language), but as of June 2012, the Facebook developers stopped supporting FBML and all apps are written in HTML, JavaScript, and CSS.<\/p>\n\n\n\n<p>Using any WYSIWYG (What You See Is What You Get \u2013 essentially any text editor without automatic formatting [like Microsoft Word] such as Notepad) HTML editor, write the content that you want to display inside your Facebook application.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">What is a canvas page?<\/h4>\n\n\n\n<p>Simply the main page of your application that the user sees each time they click on your app. Set up a new app, give it a name. Enter in the following details:<\/p>\n\n\n\n<p>Canvas URL\u2013 the unique name for your app @http:\/\/apps.facebook.com\/. You can flesh it out with icons, descriptions, etc too.<\/p>\n\n\n\n<p>Canvas Callback URL \u2013 the full URL of the canvas page to be stored on your MySQL server. Log in to your web server where you\u2019ll be hosting the Facebook App and create a sub-directory called \u201cfacebook\u201d. So if your domain is example.com, the Facebook app can be accessed from example.com\/facebook.<\/p>\n\n\n\n<p>Now we need to create a setup page for users that wish to add your app. A beginner should be using the official PHP client. What we\u2019ll be doing is showing a simple image.<\/p>\n\n\n\n<p>This should be a basic beginning PHP script. Go to the file you entered in as the Canvas Callback URL \u2013 this is the jump-off point for all calls from Facebook to your application.<\/p>\n\n\n\n<p>\/\/ Include the Facebook client library<\/p>\n\n\n\n<p>require_once (&#8216;facebook.php&#8217;);<\/p>\n\n\n\n<p>\/\/ Set authentication variables<\/p>\n\n\n\n<p>$appapikey = &#8221;;<\/p>\n\n\n\n<p>$appsecret = &#8221;;<\/p>\n\n\n\n<p>$facebook = new Facebook($appapikey, $appsecret);<\/p>\n\n\n\n<p>\/\/ I also will be accessing my own database on almost every call so will set db up here<\/p>\n\n\n\n<p>$username=&#8221;&#8221;;<\/p>\n\n\n\n<p>$password=&#8221;&#8221;;<\/p>\n\n\n\n<p>$database=&#8221;&#8221;;<\/p>\n\n\n\n<p>mysql_connect(localhost,$username,$password);<\/p>\n\n\n\n<p>@mysql_select_db($database) or die( &#8220;Unable to select database&#8221;);<\/p>\n\n\n\n<p>You are now ready to interact with the Facebook API.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Using the Facebook API<\/h4>\n\n\n\n<p>The Graph API is the core of Facebook Platform, enabling developers to read from and write data into Facebook. The Graph API presents a simple, consistent view of the Facebook social graph, uniformly representing objects in the graph (e.g., people, photos, events, and pages) and the connections between them (e.g., friend relationships, shared content, and photo tags). Along with maybe the application directory, this is the most powerful aspect of the Facebook platform for developers. Given the right incentives\/marketing\/branding\/whatever you wish to call it, apps on Facebook can spread like wildfire. Two features commonly used by Facebook developers to reach a wider audience are app invites and news feed stories.<\/p>\n\n\n\n<p>Both are normally done at app sign up time and are used to inform members of the user\u2019s personal network. But they differ in that an invite is an explicit question targeted at friends of the user\u2019s choice while the newsfeed option is a passive choice to people that they are using your application. It\u2019s harder to get a user to send out invites because they aren\u2019t always welcome but if a user does target them successfully it may lead to a higher sign-up rate amongst their friends.<\/p>\n\n\n\n<p>That\u2019s it. Anyone can now add your Facebook app to their profiles either in the Boxes tab or in the sidebar of the main profile page.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Facebook App Tips &amp; Tricks<\/h4>\n\n\n\n<p>Also, there are a few additional tricks you can remove from your sleeve to dazzle your visitors:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You can incorporate RSS feeds in your Facebook apps through a feed parsing library like SimplePie.<\/li><li>You can track your Facebook application usage via Google Analytics. Just add the following code in the PHP code.<\/li><li>You can use the same CSS Styles and color schemes for your Facebook Apps that are used on the main Facebook site.<\/li><li>If you want to embed YouTube video in your Facebook apps, you should use the tag.<\/li><li>If you are using your Facebook page as a way to do business networking, consider adding the BranchOut app to your Facebook page.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>You want to create a Facebook App, but don\u2019t know where to start? Or you have heard about Facebook Apps, but don\u2019t even know what they are. Facebook Apps are everywhere on the site, and most of the more common ones are actually written by Facebook\u2019s own developers. Photos, Events, and many other \u201ccore\u201d features&#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-111961","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>Facebook App For Your Page - 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\/facebook-app-for-your-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Facebook App For Your Page - Tutorial\" \/>\n<meta property=\"og:description\" content=\"You want to create a Facebook App, but don\u2019t know where to start? Or you have heard about Facebook Apps, but don\u2019t even know what they are. Facebook Apps are everywhere on the site, and most of the more common ones are actually written by Facebook\u2019s own developers. Photos, Events, and many other \u201ccore\u201d features...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/\" \/>\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:41+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"5 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\/facebook-app-for-your-page\/\",\"url\":\"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/\",\"name\":\"Facebook App For Your Page - Tutorial\",\"isPartOf\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/#website\"},\"datePublished\":\"2021-03-08T10:11:49+00:00\",\"dateModified\":\"2024-04-12T09:01:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.vskills.in\/certification\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Facebook App For Your Page\"}]},{\"@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":"Facebook App For Your Page - 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\/facebook-app-for-your-page\/","og_locale":"en_US","og_type":"article","og_title":"Facebook App For Your Page - Tutorial","og_description":"You want to create a Facebook App, but don\u2019t know where to start? Or you have heard about Facebook Apps, but don\u2019t even know what they are. Facebook Apps are everywhere on the site, and most of the more common ones are actually written by Facebook\u2019s own developers. Photos, Events, and many other \u201ccore\u201d features...","og_url":"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/","og_site_name":"Tutorial","article_publisher":"https:\/\/www.facebook.com\/vskills.in\/","article_modified_time":"2024-04-12T09:01:41+00:00","twitter_misc":{"Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/","url":"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/","name":"Facebook App For Your Page - Tutorial","isPartOf":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/#website"},"datePublished":"2021-03-08T10:11:49+00:00","dateModified":"2024-04-12T09:01:41+00:00","breadcrumb":{"@id":"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.vskills.in\/certification\/tutorial\/facebook-app-for-your-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.vskills.in\/certification\/tutorial\/"},{"@type":"ListItem","position":2,"name":"Facebook App For Your Page"}]},{"@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\/111961","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=111961"}],"version-history":[{"count":1,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/111961\/revisions"}],"predecessor-version":[{"id":111962,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/pages\/111961\/revisions\/111962"}],"wp:attachment":[{"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/media?parent=111961"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/categories?post=111961"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vskills.in\/certification\/tutorial\/wp-json\/wp\/v2\/tags?post=111961"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}