[HOW TO] Make Users Like Your Page via Facebook Applications

by • April 5, 2013 • FacebookComments Off on [HOW TO] Make Users Like Your Page via Facebook Applications4009


We have all seen these applications where you must LIKE the page before you can actually access the application itself. This is widely use as it shows to be one of the most efficient way to gain new fans on Facebook.

But how do you actually make this happen? The answer is easy: Facebook SDK

You can download the Facebook SDK from Facebook for Developers. Then use these few pHp lines of code to “hide” and “show” content depending on the user having liked your page or not:

require ‘src/facebook.php’;
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
  ‘appId’ => ‘[YOUR_APP_ID]’,
  ‘secret’ => ‘[YOUR_APP_SECRET]’,
$theRequest = $facebook->getSignedRequest();

if($theRequest[“page”][“liked”] == 1){ echo “The real content”;}

else{echo “Like our page to view”;}

Did you like this post? Subscribe to our Newsletter!

We don't spam, we will just send you a daily email with the best of our posts.

Comments are closed.