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.
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 URL, Page 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.
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: http://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL
You need to replace YOUR_APP_ID with the app’s ID and YOUR_URL with the app’s site url.
I’ll show you a short snippet to display the page’s information using PHP.
1 2 3 4 5 6 7 8 9 10 11 12
require '../src/facebook.php'; $facebook = new Facebook(array( 'appId' => '128476427297713', 'secret' => 'e53f919119efd37cf2cb9d294e0da582', )); $signedRequest = $facebook->getSignedRequest(); $pageInfo = $facebook->api('/'.$signedRequest['page']['id']); print_r($pageInfo);