Facebook Secret Hide Content on Fan Page Until Someone Likes It

Hiding content on your Facebook welcome page can be a great incentive for people to like your page to get the hidden content. Since Facebook depreciated FBML we now have to use iFrames. This is pushing it further into the realms of developers rather than end users.
SEE LIVE EXAMPLE

How To Do It?

An iFrame only points to an html or other web-based file, it doesn’t actually do anything else. Hence the file you are pointing to is not contained on Facebook and can not directly access certain information. This means we must use either JavaScript or a server-based language such as PHP or .NET to communicate with Facebook as would an external page.

Since JavaScript and other methods require actual permissions from the user to see this information the only way I have found to do it, is to look in the “session” so to speak.

Step 1 – Create A PHP file and create the iFrame

If you don’t have an iFrame and php file already look at: How To Add An iFrame Application Tab To Your Facebook Page. This will take you through adding an iFrame application tab to your Facebook page.

However replace the .html file with a .php file. Only the extension of the file name needs to change and not anything else within the example.

Step 2 – Insert Code into PHP file

Next you need to add this in the part of your PHP file you want to display a different message for non fans and fans.

You are a fan – insert html here

You are not a fan – insert html here

Step 2 – Testing

To properly test your code:

– Go to your Fan Page and click the Unlike Button in the bottom left hand side of your page.
– You should now see the “Like” button at the top, meaning that you’re not yet a fan
– You should see the content of Non-Fan
– Click the “Like” button; you should then see the fans-only content and the non-fan content will go away

That’s It!

Previous Facebook + Outlook = FBLook
Next Got a Question? Ask on Facebook with Questions feature

About author

Jarrett Gucci
Jarrett Gucci 289 posts

Jarrett Gucci is the owner of Dynasty Web Solutions. A full service Internet presence provider specializing in WordPress development for business owners. Jarrett Gucci along with his team of professionals have designed over 400 WordPress websites. Jarrett Gucci believes strongly in creating websites that are unique, functional and generate referrals.

You might also like

Facebook 0 Comments

How to embed Youtube video on your Facebook Wall

There are many applications created to allow you to link YouTube video to your Facebook profile. With the instructions below I’ve selected the YouTube application that is used the most

Facebook 0 Comments

See All of Your Facebook Share Stats on WordPress

Replace the area where it says “YOUR_PAGE_ID” with the Page ID you created in Step #1. Hit Update File after you make your changes. click to enlarge Step 3. Go

Facebook 0 Comments

Got a Question? Ask on Facebook with Questions feature

Facebook’s worst-kept secret is finally ready for its closeup: the company is starting to roll out Facebook Questions, a Q&A service that allows users to poll all of Facebook. Facebook

Facebook 0 Comments

Some Really Funny Facebook Humor – Made Me Crack Up

VN:F [1.9.21_1169] please wait… Rating: 10.0/10 (4 votes cast) Take a look below and see what Facebook would be like if it was around long ago. Would love to see

Facebook 0 Comments

Facebook Select All Invite or Fanpage Hack/Code

UPDATE: After this post was originally written, Facebook came up with a solution to create lists of friends. You can create several lists, based on your own personal criterias, and

Facebook 0 Comments

10 Rules For Advertising On Facebook

n this guide, I’ll walk you through 10 of the most important laws for businesses when advertising on Facebook. These are laws that define how Facebook advertisements function and general

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply