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

Facebook + Outlook = FBLook

If you are an Outlook user, you probably have it open all the time. Now you can update your Facebook status, see your friend statuses and see the number of

Facebook 0 Comments

How to connect your Domain to Facebook for Insights

To connect your website to Facebook visit the new Insights page and follow this guide, this is a new area of Facebook that gives brand new statistics about Interaction on

Facebook 0 Comments

Facebook Connect WordPress Plugin

ContentsDownload the latest version here + New Open Graph Social Plugins (V.3.0.6)Download here (V.2.5.2)Download Thesis theme compatibility for (V.1.2.1) Facebook OpenGraph and Social plugins for WordPress (new Facebook Connect plugin):

Facebook 0 Comments

Hide certain content from non-fans

ContentsContent for Fans OnlyHow to Show Different Content to Fans and non-FansRead Full Article with more details HERE Author Tim @ The HyperArts Blog If you want to show content

Facebook 0 Comments

Facebook is Going to Charge for Membership – DO NOT BELIEVE IT

VN:F [1.9.20_1166] please wait… Rating: 9.0/10 (1 vote cast) If you see the following message below on Facebook, DO NOT pay any attention to it. FACEBOOK JUST RELEASED THEIR PRICE

Facebook 0 Comments

10 Secrets To Creating Your Brand’s Facebook Presence

Contents1. Build It, And They Might Come2. Establish Your Page with Real Customers3. Talk Like a “Friend”4. Content is King5. World Premiere6. Be Open7. Remove & Report8. Act “Like”able9. Invite

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.