Reveal tab index.php code that used to work doesn't now. How do I fix?
I've used this code for dozens of reveal tabs and now they've stopped working. I've found a fix for the https pages, but that fix doesn't work on http pages. Please see the code below and any specific help would be great.
<?php
require 'facebook.php';
$app_id = "APP_ID";
$app_secret = "APP_SECRET";
$facebook = new Facebook(array(
'appId' => $app_id,
'secret' => $app_secret,
'cookie' => true
));
$sign开发者_C百科ed_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"];
// If a fan is on your page
if ($like_status) {
$a = file_get_contents("yourlikepage.html");
echo ($a);
} else {
// If a non-fan is on your page
$a = file_get_contents("yournolikepage.html");
echo ($a);
}
?>
I am by no means a coder. Please be specific in your response with actual code fixes as otherwise it's likely your answer, as awesome as it'll be, will soar over my limited brain.
Thanks!
As one limited brain to another, I just wanted to double check that you are actually entering in your App ID and App Secret. I hope this doesn't seem like a stupid question - you'd be surprised!
精彩评论