Facebook Pages Customizing - tutorial 1

kumarasiri

Well-known member
  • Apr 29, 2007
    9,940
    127
    63
    Adding a tab to your facebook fan page tutorial 1

    This will be helpful to you if you are an admin of a facebook fan page. Page ekata aluthen tab ekak daana widiya gana mama liyapu tutorial ekak.. :)



    There are two ways of adding a custom tab to your page.

    1. Using static FBML app
    2. creating an dedicated facebook app for the page

    Using static FBML application

    Go to the application http://www.facebook.com/apps/application.php?id=4949752878 and press Add to my page button and select the page or pages you want to add custom tabs. And now the application is installed to your page and you can use it by clicking Edit page button on the page you admin. On the edit page you will find something like FBML - FBML. Press edit button and edit the Box Title: (which will be the tab name) and the FBML: ( use HTML, FBML some Java scripts, FBJS ). This method is good for a simple tab which contains photos, Slide shows (Flickr, Photobucket..),mp3s, videos, links etc. But when you want something more than that, Publishing a story to your wall from your page, adding a comment box to the page, creating a dialog box or sending invitations from the page like they use in facebook applications, you need to create a FB app for the page.


    Facebook application for fan pages

    Firstly I have to say that this method is the best way to create a beautiful and attractive fan page. And most of the facebook fan page admins don’t use this method. Always remember that the harder the better.. hikz.. :P
    only thing matters on this method is that you need to have a web hosting. Trust me, you can get one for free. (even im using a free hosting for my pages :P )

    First of all lets take a look at some pages which are using this method.

    Coca-cola
    Twilight

    And my pages

    Boys rule the world!
    Girls rule the world!
    Soora pappa
    Send4Free



    Now lets get started with creating an app on facebook platform. In this tutorial you’ll follow how to build an application for your page
    1 st of all go to http://developers.facebook.com/get_started.php and download PHP client library

    Go to your server and upload those files
    I used www.110mb.com for this. What I care the most is IT’S FREE! lol. We need to set the index.php as the canvas URL of the application (yourdomain.com/facebook-platform/php/index.php)


    Go to http://www.facebook.com/developers/ and press Setup a New Application button. Fill the application name and bla bla things.

    2rn7nkw.jpg



    Authentication Settings

    Change Installable to? tick to facebook pages. So other people will not be able to add this application to their profile and you’ll be able to add it to your own page.

    Canvas


    Click to zoom

    Set a canvas page name.
    Set the canvas callback URL to the index.php
    And change Render method to FBML

    Profiles


    Click to zoom


    Tab name Welcome!
    Tab URL http://apps.facebook.com/mytestapp/welcome

    Now go to index.php and edit it to

    Code:
    <?php
    // Copyright 2007 Facebook Corp. All Rights Reserved. 
    require_once 'facebook.php'; 
    $appapikey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
    $appsecret = ' xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ';
    $facebook = new Facebook($appapikey, $appsecret);
    $user = $facebook->get_loggedin_user(); 
    $is_logged_out = $user;
    ?>

    And now!! You are ready to do it… XD
    i will post next tutorial "How to use special javascript effects to your page (FBJS)" works with both Static FBML app and your own custom made app

    Send a PM if you need any help