我有这个代码块工作,但不再......
索引.php
<!doctype html>
<?php
require 'php-sdk/src/facebook.php';
$facebook = new Facebook(array(
'appId' => '453976824647366',
'secret' => 'fe86f3b0b34b3ed6eXXXXXX',
'cookie' => true,
));
$signedRequest = $facebook->getSignedRequest();
$liked = $signedRequest["page"]["liked"];
if ($liked) {
header('Location:youlike.php');
} else {
echo "you don't like";
}
?>
<html lang="en" xmlns:fb="https://www.facebook.com/2008/fbml">
<head>
</head>
<body>
</body>
</html>
你喜欢.php
You like!
它总是显示“你不喜欢”,似乎它永远不会进入 youlike.php
再次感谢一些帮助!
谢谢