Facebook has become one of the most popular social networking sites. Most of the users use Facebook applications. How do the applications work? Apps on Facebook are web apps that are loaded in context of Facebook Canvas Page. A canvas page is a blank page within Facebook on which the app is run. Facebook applications are called from the developer’s production environment when the URL is called. The URL of the application is registered in Facebook. When the URL is called, Facebook directs the request to the developer’s server. The application processes the request, communicates with Facebook using Facebook API or Facebook Query Language (FQL). The following are the major components involved in Facebook app creation:

Facebook Canvas Page: Apps are loaded into canvas page. A canvas URL containing HTML, JS and CSS is used to populate the canvas page. When a user requests the canvas page the canvas URL is loaded in an iframe.

Social Channels: The advantage of Facebook Platform is the potential to reach millions of Facebook users. Social channels include bookmarks, notifications, news feed stories and search. Social channels enable new users to discover new apps and allow existing users to re-engage with existing users.

Analytics: Insights regarding app usage helps companies in understanding the interaction between the user and the app. Feedback for stream stories, referral traffic to app, user actions vs active user count, user demographics, permission related information are tracked. Diagnostics for apps are also provided to track API errors, access allocations and throttling information.

Source: https://developers.facebook.com/, Building Facebook Applications for Dummies book.