• Become a Shouter : Join here
  • X

    How to Hide a Tab’s Content Until One Likes your Facebook Fan Page

    By in Facebook

    This is a guest post by Zain who blogs at TipsoTricks. If you would like to write forShoutMeloud, read our guest posting guidelines.

    Facebook fan page is great way to interact with your readers, fans and followers. You can quickly send updates to all of your fans at once. You can have instant chat with them and observe how your fans are doing. But did you know that you can create sub pages or tabs in your Facebook fan page, just like you create in your blog? If No, then don’t worry because I’m going to explain how to do this in the easiest way possible.

    With separate sub pages or tabs you can put important announcements, banners, ads, giveaways info, promotions, interactive feedback or subscriptions forms or a simple welcome message for your fans. Optionally, you can set that tab as the startup tab, so that new visitors entering your fan page would see the content of that tab without seeing the wall first.

    The interesting thing that I’m going to share in this post is, hiding a tab’s content until a curious visitor who want’s to see the content in the tab, likes your page.

    If a real interesting content (like giveaway info or link) is hidden in a tab, the visitor would never mind to click the LIKE button the see the content — a clever way to increase your likes.

    This all can be done within few minutes. All you need is an app called, “Static FBML” installed in your fan page. To save the steps of searching and adding the app, I’m giving the link that directly installs Static FBML to your page.

    Just follow the steps carefully:

    1. Copy the link below, paste in the address bar of your browser, replace the XXX part with your page ID and press enter:

    http://www.facebook.com/staticfbml/edit.php?owner_id=XXXXXXXXXXXXXXX&app_id=4949752878

    To know your page’s ID, open your fan page and press CTRL+U. You’ll see all the source code. From there look for ‘<link rel=”alternate“…’ (it sould be at line # 23-26) and note the ID.

    Facebook Fan Page - Getting Unique ID

    2. If you’ve multiple fan pages under your account, choose the one in which you want to install and click “Add Static FBML” button.

    Adding Static FBML to Facebook Fan Page

    3. From your fan page, click ‘Edit Info

    Facebook Fan Page - Edit Info

    4. From the settings page, click ‘Apps

    Facebook fan Page - Apps

    5. From the list of installed apps see Static FBML down the page, and click ‘Go to App

    Facebook fan Page - Installed Apps

    You’ll see an editing screen, where you’ll enter the title of the tab and it’s content.

    6. Give any name to your tab in “Box title” field.

    Static FBML - Adding Title and Content

    7. In FBML field, you are going paste this piece of code:

    <style type="text/css">

    .content_box{
    width: 100%;
    float: left;
    position: relative;
    overflow: hidden;
    }

    .content_for_fans{
    width: 520px;
    height: 500px;
    float: center;
    position: relative;
    background: #fff;
    z-index: 9;
    }

    .content_for_non_fans{
    width: 520px;
    height: 500px;
    float: center;
    position: relative;
    background: #fff;
    margin-top: -500px;
    z-index: 0;
    }

    </style>

    <div class="content_box">
    <fb:visible-to-connection>
    <div class="content_for_fans">

    <!-- PUT THE CONTENT HERE --- THIS WOULD BE VISIBLE ONLY TO THOSE WHO LIKE THE PAGE -->

    </div>
    <fb:else>

    <div class="content_for_non_fans">

    <!-- PUT THE CONTENT HERE --- THIS WOULD BE VISIBLE TO THOSE WHO DO NOT LIKE THE PAGE -->

    </div>
    </fb:else>
    </fb:visible-to-connection>
    </div>

     

     

    8. Replace the code in red with your content, images or any custom HTML code. This will be visible to your fans.

    Replace the code in green with your content, images or any custom HTML code. This will be visible only to those who do not like your page.

    Note: the tags contains all the styling (positioning of the content, layout, background color etc) of the content box. Do not alter it unless you know what you’re doing!

    9. Click ‘Save Changes‘ when you’re done editing.

    10. See your fan page and click the newly created tab to see how it looks. You may logout and visit your fan page to see the content set for non fans.

    Setting up the custom tab as default landing tab

    1. Click ‘Edit Info‘ on your page (step 3) and click ‘Manage Permissions

    2. From right page, see ‘Default Landing Tab‘ and select the one you wish to set as default.

    Facebook Fan Page - Setting up tab as default

    Once someone standing on the custom tab hit the like button, the page will auto refresh and the content will change automatically, intended for those who like your page.

     


    I’ve done it successfully on my own fan page, you can view that as working demo here, to get the idea how it actually works.

    Hope you liked the efforts and learned from this step by step tutorial of creating custom tabs. Your comments are valuable, so feel free to ask anything regarding setting up custom tabs.

     

    Subscribe Updates, Its FREE!

    Article by

    Zain has written 4 articles.

    If you like This post, you can follow ShoutMeLoud on Twitter. Subscribe to ShoutMeLoud feed via RSS or EMAIL to receive instant updates.

    { 38 comments… read them below or add one }

    Elizbath

    Thanks Zain thats really an amazing tutorial .. Few days back i have visited a FB fan page. The have use the same way and hide some content when i Like their page that content was visible to me…Also i have noticed that…they welcomed you by your profile name..for example if you visit their Fan Page from your account.. Then a welcome message will be shown with your name..”Welcome Your name (Zain)”.
    How i can add welcome message like that??

    Reply

    Ayesha

    Good one :)

    Reply

    Tech Blogger

    great tips. I also made good and attractive front page in facebook.. Fans growth is good. But i will try your code to increase more. By the way, now i am in Symbian mobile and your site loads faster. All the best.

    Regards
    Musthafa Ullal
    TekNoise

    Reply

    Nasif

    Great article !!! Nice work Zain

    Reply

    Love in India

    Very helpful post. It’s a small matter but very use to upcoming webmasters and bloggers. I bookmarked it. :)

    Reply

    Zain

    Thanks for reading and bookmarking this

    Reply

    Derek

    Cool tip Zain, thanks for sharing and u have got a nice collection of tips at ur tipsotricks blog.

    Reply

    Zain

    Thanks Darek for visiting my blog too :)

    Reply

    Sandeep Singh

    Nice info mate ! Was looking out for this !

    Reply

    Karan Labra

    Nice tutorial..
    Didn’t know we could really do that..
    Thanks! :D

    Reply

    Rahul Ghosh

    how do i configure it that once people like my page they will be able to see my status update for the particular page? Plz help.

    Reply

    Zain

    Once liked you cannot redirect a user to some other tab. They will be on the same tab even after liking the page. But you can put a link to the ‘wall’ of your fan page in the fbml code

    Reply

    Rahul Ghosh

    ok thanks man i will give it a try and see whether i get some likes to my websites FB page.

    Reply

    Raghav

    It’s a wonderful trick but will you pls tell me that how to add Adsense code in it? If possible to add adsense then what resolution and which type of ad (link or text) should we use in it?

    Reply

    Zain

    put the adsense code just you like you put any html or javascript. The tab’s content area is of 500px wide. So any adsense ad below 500px width should easily fit in.

    Reply

    shashank

    zain zain this is awesome again !
    Dude great share buddy ;)
    thanks a lot buddy !

    Reply

    Zain

    thanks for your comment shashank :)

    Reply

    Bhawan Virk

    This will help us to gain more likes for our facebook page eg:- we can put a link to download our ebook for those who liked our page. By the way thanks for sharing this code.

    Reply

    Nasif

    Great article Zain. Thanks for the share :)

    Reply

    Rohan

    Thanks for sharing , makes a good article for quick reference *bookmarked*
    However facebook has somehow tagged my page as a community page and even after repeated support requests with facebook and attempts to re-categorize it as a business page the headache still remains ! That does not make a lot of difference except that I can’t set default landing page for new visitors and have to direct them to the FBML page manually……

    Reply

    Vijayraj Reddy

    Ya, having this type of page will increase fans as they will click like button before viewing wall of the page….

    Reply

    VISHAL

    Great tutorial man, I was looking for the same.

    Reply

    Swamykant

    Excellent tutorial. Thanks for share.

    Reply

    ashwin shahapurkar

    thats really useful. But may i know how can i automatically redirect the user to “Wall” once he likes the page? …i already tried simple html redirecting (using meta) but i doesn’t work. Could You please try to find that?

    Reply

    Zain

    Ashwin, the redirection script doesn’t work in FBML!!

    There’s no way you can auto redirect your fans to any other tab after they like the page.

    Reply

    Bhawan Virk

    Hey ashwin here is a way to redirect the user to a different tab after he/she likes the page but in this tutorial the author uses facebook iFrame tabs instead of FBML. Check it out here:- http://www.hyperarts.com/blog/facebook-iframe-tabs-redirect-fans-to-a-different-tab-reveal/

    Reply

    Khabri Chacha

    i tried the trick with static pages, it’s not working :(

    Reply

    ashish

    Thanks for sharing such a nice tutorial zain..

    Reply

    Maninder @ HackTik.com

    Very nice trick to get your fan following. Thanx for sharing this.

    Reply

    Joshua Steenmeyer

    Back on May 19th Facebook announced via the developer forum that Facebook Pages now need to be authenticated in order to have landing tabs. This means any new visitor to your Facebook Page will not be able to land on a custom tab unless you have greater than 10,000 fans or the Page administrator has worked with an ads account representative

    Reply

    Zain

    Thanks for sharing this Joshua, but can you share the link of this announcement?

    Reply

    Edgar

    I dont know if i do something wrong but dont work whit me

    Reply

    Zain

    Make sure all the tags are properly closed. Give attention to div tags.

    Reply

    rajmeej poudel

    but now facebook cannot allowed static apps.. did you have any alternative…

    Reply

    Naveen

    Thanks Zain Ali…i like your post..was looking for something like that.. :)

    Reply

    Mohit

    Thanks Zain for the tutorial,Nice info

    Reply

    Peter Mastriano

    Is it possible to set up more than one FBML in order to conduct multiple contests?

    Reply

    A.J.

    Ahh I’ve really tried but I have no idea how to follow this, it’s gone straight over my head, is there no other way?? It seems very technical :/ I just want people to like my page in order to see the pictures, I though facebook would make this a lot easier to do?

    Reply

    Leave a Comment

    Previous post:

    Next post:

    `