See our funky facebook page – Live Demo (opens in new window… Don’t forget to ‘like’ it
)
What the hell is a facebook like gate?
Like gate is a facebook page tab that serves some content of value to who ever ‘Likes’ the page while displaying a different message for those who have not yet ‘Liked’ the specific facebook page, typically a message describing “hidden treaures” the potential ‘Liker’ would reveal if he is to click ‘Like.’ So basically it serves exclusive-content only to the users of the page.
If the exclusive content provides great value it is a surefire way to increase fb likes exponentially. In other words brilliant appealing graphics alone is not sufficient to earn ‘Likes’ from users as facebook users are becoming more and more selective on what they do on facebook, even if its a tiny click on the ‘Like’ button.
Since you have created some excellent exclusive content just for your facebook fans, now its time to put them to good use. For this example we use the facebook PHP SDK. If your tab is already using PHP SDK fine. If your tab page is of plain simple HTML and CSS then download the facebook PHP SDK from Github at https://github.com/facebook/php-sdk. Unzip it and upload the “src” folder to your webhost via FTP and place it inside the folder where all of your iFrame tab files reside. The groundwork has been done.
Now create an “index.php” file (using notepad is just fine…) and insert the following code.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> YOUR PAGE TITLE </title>
</head>
<body >
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId : 'YOUR APP ID', // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
// Additional initialization code here
};
// Load the SDK Asynchronously
(function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js);
}(document));
</script>
<?php
require '/src/facebook.php';
$app_id = "YOUR APP ID";
$app_secret = "YOUR APP SECRET";
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true
));
$signed_request = $facebook->getSignedRequest();
$page_id = $signed_request["page"]["id"];
$page_admin = $signed_request["page"]["admin"];
$like_status = $signed_request["page"]["liked"];
$country = $signed_request["user"]["country"];
$locale = $signed_request["user"]["locale"];
?>
<?php if ($like_status) { ?>
EXCLUSIVE MEMBER CONTENT HTML, CSS AND/OR JAVASCRIPT
<?php } else { ?>
LANDING PAGE FOR NON-MEMBERs HTML, CSS AND/OR JAVASCRIPT OR EVEN JUST SINGLE IMAGE (WHATEVER YOU LIKE)
<?php } ?>
</body>
</html>
Now change all instances of “YOUR APP ID” with your iframe tab App ID and “YOUR APP SECRET” with your iframe tab App secret key. Most important part is yet to be done. Ah, the content. Add your exclusive member content replacing the all capital sentence “EXCLUSIVE MEMBER CONTENT…” and add your tempting graphic, infographic or a simple HTML landing page giving all your reasons why visitors (non members) should “Like” your page replacing the sentence “LANDING PAGE FOR NON-MEMBERs HT…”. Now all you have to do is upload the cutie to the working iframe tab folder at your webhost.
Now, always maintain a backup of your existing ‘index’ file. If the existing index file is an “index.html” uploading the “index.php” would not replace it. so simply change the name of index.html to something else before uploading. This way not only the conflicting index file issue will be resolved, but also you have the original index.html file at the server as a backup. But remember to get rid of it once you have the new iframe tab working and you are totally satisfied with it.
Now add more funky exclusive content by adding more iframe tabs and make them look awesome, just like our facebook page
Disclaimer: Any codes, methods, advice or tips provided here is of my own experience and they do not come with any warranty whatsoever. Use them at your own risk. I shall not be held liable for any damage, discrepency that may or may not arise during your appliaction of the same codes, methods, advice or tips.

Awesome