我的代码:
<?
session_start();
include('facebook.php');
$config['appid' ] = "xxxxxxxxx";
$config['secret'] = "xxxxxxxxx";
// Create our Application instance.
$facebook = new Facebook(array(
'appId' => $config['appid'],
'secret' => $config['secret'],
'cookie' => true
));
$signedRequest = $facebook->getSignedRequest();
if($signedRequest['page']['liked'] == 1) echo "LIKED";
?>
代码无法在新创建的应用中运行,但它适用于较旧的应用。
我需要帮助。我做错了什么?
感谢您的回答
答案 0 :(得分:0)
你能做var_dump($ signedRequest);
您的服务器是否有SSL证书? 禁用https的Facebook后测试您的应用程序 - &gt; https://www.facebook.com/settings?tab=security&edited=browsing