Creating Facebook apps for pages

Facebook apps for pages – they are Facebook apps that can be used in Facebook pages in order to customize user experience. They can range from contact forms, galleries, e-shops, slideshows, embedded flash or anything you can think of.

In the past, you can actually create a customized landing page using apps for pages. But at the moment, it seems the new updates made my Facebook on their site is preventing us from doing this. Nevertheless, apps for pages are still very useful and in fairness, the Facebook updates actually made it easier to create these apps.

Create facebook app

To begin, you need to create your app in the developer page.  Creating it is just a matter of following the instructions.


Create the app

Enable Page Tab

Once the app is created, you need to enable the “Page Tab” and “Website with Facebook Login” in the integration section. To do this, you need to at least provide a Site URLPage Tab Name, Page Tab URL and a Secure Page Tab URL. The Page Tab URL is the location on where the content of the app will be pulled from. You also need to provide a Secure Page Tab URL – this is where the content is pulled if the user accessing the app is  using https.

Enable page tab in your app

Add the app to your page

Now, we need to make our page use the app. This part is a bit tricky, but I discovered a way to do it. All you need to do is use this link:

You need to replace YOUR_APP_ID with the app’s ID and YOUR_URL with the app’s site url.

Example is

building the URL to add the app to your pageVisiting the link above will take you to a “Add Page Tab” dialog. From here you can then select the pages where you want the app to be used.

Add Page Tab dialog
The app is now added to the pageAt this point you are now ready for coding. You can use Facebook SDKs to access the api to retrieve some data.

I’ll show you a short snippet to display the page’s information using PHP.


require '../src/facebook.php';
$facebook = new Facebook(array(
  'appId'  => '128476427297713',
  'secret' => 'e53f919119efd37cf2cb9d294e0da582',
$signedRequest = $facebook->getSignedRequest();
$pageInfo = $facebook->api('/'.$signedRequest['page']['id']);



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s