Facebook - simple code not work
<? require('../src/facebook.php');
     
                
 $app_id = there is code :)

$app_secret = there is code :)

$facebook = new Facebook(array(

'appId' => $app_id,

'secret' => $app_secret,

'cookie' => true

));



$signed_request = $_REQUEST['signed_request'];
$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"];



if ($like_status)

// If a fan is on your page

if ($like_status) {


echo "FAN";
} else {

// If a non-fan is on your page

echo "NO-FAN";

}

?>

Why it not work?
Facebook - simple code not work
===

<? require('../src/facebook.php');
     
                
 $app_id = there is code :)

$app_secret = there is code :)

$facebook = new Facebook(array(

'appId' => $app_id,

'secret' => $app_secret,

'cookie' => true

));



$signed_request = $_REQUEST['signed_request'];
$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"];



if ($like_status)

// If a fan is on your page

if ($like_status) {


echo "FAN";
} else {

// If a non-fan is on your page

echo "NO-FAN";

}

?>

Why it not work?