I want to write a fangate for my facebook page, but it didnt work and i doesnt find any help on the inter net
require \'facebook.php\';
$app_id = \'16850872
There are a few errors with the code you sent. This is what I use, and it works:
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));
if($data->page->liked) {
echo "This content is for Fans only!";
} else {
echo "Please click on the Like button to view this tab!";
}
}
And don't post your application secret key on the forum, please edit your post as soon as possible.