код проверки подписанного запроса:
$signed_request = $_REQUEST['signed_request'];
function parsePageSignedRequest(){
if (isset($_REQUEST['signed_request'])){
$encoded_sig = null;$payload = null;
list($encoded_sig, $payload) = explode('.', $_REQUEST['signed_request'], 2);
$sig = base64_decode(strtr($encoded_sig, '-_', '+/'));
$data = json_decode(base64_decode(strtr($payload, '-_', '+/'), true));
return $data;
}
return false;
}
if($signed_request = parsePageSignedRequest()){
if($signed_request->page->liked) {
// put your "Liked Page Content Here"
} else {
// put your "Alternate" Page Content Here.
}
}