Skip to content

Instantly share code, notes, and snippets.

@SecureCloud-biz
Forked from niraj-shah/check_likegate.php
Created July 13, 2014 00:16
Show Gist options
  • Save SecureCloud-biz/712ebccaa714c1ba003e to your computer and use it in GitHub Desktop.
Save SecureCloud-biz/712ebccaa714c1ba003e 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