Facebook Application Development Tutorial

Facebook Application Development Tutorial

So you want to build a Facebook application and reach literally millions of users. Well luckily, writing an application using the API isn’t too hard to learn (for the basics, anyway). In this tutorial we will write a Facebook app that generates a random quote to display on the user’s profile.

Currently Facebook application development is one of the most popular projects for PHP developers. After we have implemented several Facebook applications we decided to share our knowledge with other developers who are just starting to learn this technology.

Facebook allows you to integrate third-party applications with its core: on one hand it allows application to receive access to Facebook implemented features, on the other hand, Facebook expands its features using third-party developers. Such apps could be placed on any external server and could be created almost on any programming-language such as PHP, Python, Java or C#. Thus Facebook application is any app working in Facebook context.

There are 3 ways to integrate your application into Facebook and respectively 3 types of Facebook apps:

  • FBML-apps (Canvas Application) – based on subset of HTML with adding own tags (this is FBML), simplified JavaScript with support of common dialogues. In this type of Facebook apps CSS features are also limited. In work Facebook requests FBML-page from your application server, translates it in HTML and displays app in canvas. For now this type of application is obsolete and isn’t recommended for usage.
  • iFrame-apps – can also use FBML-tags (if respective library is connected), but based on standard HTML, JavaScript as well as CSS. When user requests application web-page, app loads in iFrame-element from web-site where this app was placed. As a result, your app is displayed in common Facebook frame.
  • External apps – are usual web-sites with possibility to login using Facebook account. There are also different social plugins and buttons for interaction with your Facebook account.

Leave a Reply