How to reveal content on your Facebook Page only when someone clicks like

Update: On March 18th of 2011, Facebook phased out the use of Static FBML. Only Pages with existing instances of Static FBML are able to follow the steps in this post.


One creative way of acquiring Facebook Page connections is to offer free cool stuff for connections, that isn’t available to anyone else (I wrote about this back in January, but it’s worth going over again). For example, on Inbound Zombie I have free video tutorials to anyone who “likes” the Page. The videos are not accessible to anyone else.

How to display “connection-only” content on your Facebook Page

Using the Static FBML application and a bit of code (see below), you can display content to a visitor once that “like” your Page.

Here’s the FBML code for the custom tab:

See the Charityhowto Facebook Page to see it in action.

Learn how one nonprofit increased their online fundraising by 1,400%!


Learn the tools, tactics, messaging, and website tweaks that created thier explosive result!


  1. Hey John! Great Insight!

    As a novice programmer, I haven't gotten into FBML coding much. Is there anything I need to do to my standard HTML pages to set them up for FBML code?

    Can I simply insert your tags above into a document with no other FBML code and it should work?

    Thanks in advance.

  2. John, brilliant as always. I've been playing around with fbml, but don't have much background even in html. So – I love finding nuggets like your post above (cute hamster BTW) to augment what I'm doing. I've plateau'd on getting “likes” on my Savvy Freelance Writers FB page, so this might be the thing to spark more interest. Thanks very much – love reading your information – always helpful.



  3. John, I loved this post so much I implemented it on my Facebook page – Savvy Freelance Writers – for a survey I've posted. I've referred others to your site simply because you always come up with such great information. Thanks again for all your teachings! (I rarely comment twice on one post, but this is the exception.) :)

  4. if i post only what is in the box below, then anyone can see what's in between the tags,
    can you post the full code that is on the example in the movie,
    so also with the text before in between and after the tags ? ?

      1. John, you are a genius! It took a bit of trial and error but this Facebook “secret code” worked like a charm.

        Thanks again buddy!

        BTW, how did you manage to get Disqus to work so well on your website?

  5. Thank you John! How about when you want one image to replace another once the page is liked?

    eg. There's an image that says LIKE TO GET 10% and once liked it's replace by the code?

  6. does this only apply to general page LIKEs or any LIKEs (comment, pic, etc)? do you know if there is a way to show content limited to content-specific LIKEs? example: i launch a product line within my already-exiting business. i post a story, and if someone LIKEs the new product, they can get 10% off. I don't want general page LIKEs to get the discount, only fans who LIKE the new product. ???

  7. Thanks so much for writing this post and doing the video.

    So you placed the “fb:visible-to-connection” before the image, is that correct?

    Do you know how to replace what is seen before you click like by something different after you click like?