Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Last active December 22, 2015 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save niraj-shah/6415980 to your computer and use it in GitHub Desktop.
Save niraj-shah/6415980 to your computer and use it in GitHub Desktop.
<?php
$sr = $facebook->getSignedRequest();
// check if the page has been liked
if ( !isset( $sr ) || !isset( $sr['page']['liked'] ) || $sr['page']['liked'] != true ) {
// likegate
header( 'Location: likegate.php' );
} else {
// regular content
header( 'Location: content.php' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment