Facebook Reveal / Fan Gate not working
===

For some reason the below code, simply will not work. It only shows the "Pre Like" page.

Any ideas what's wrong? Could it be an htaccess problem with the "facebook.php" file maybe?

Thanks,

James


    require 'facebook.php';

    $app_id = "266912000079453";
    $app_secret = "8055e3430e4ade7b1a0c6057fb9ce45b";
    $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"];

    // The following statement does a test of $like_status and chooses which page to display to the visitor
    if ($like_status) {$a = file_get_contents("reveal.php");
    echo ($a);
    }
    else {$a = file_get_contents("prelike.php");
    echo ($a);
    }
