Pre-Like Functionality For your Facebook App


If you want to make it compulsary that a user must like your facebook page to continue in your facebook app that you made, Just add this piece of condition in your code

$signed_request=$facebook->getSignedRequest();
if (isset($signed_request['page']['liked']) && !empty($signed_request['page']['liked']))
{

       //Your main code will go here

       //------------------------------

}

else
{
       echo "Like this page first to continue";
}

Tagged with: ,
Posted in Facebook Apps Development

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow me on Twitter

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 442 other followers

%d bloggers like this: