1
验证后确认我的应用程序没有按没有工作。
的arror 500,直到几个星期前,该应用程序完美。
我的索引的代码下面
$facebook = new Facebook(array('appId' => APP_ID,
secret' => SECRET,
'cookie' => false));
$user = $facebook->getUser();
if ($user) {
try {
// Proceed knowing you have a logged in user who's authenticated.
$user_profile = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
$user = null;
}
}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Il Barometro del Rischio</title>
</head>
<body>
<?php
if (isset($user) && $user != 0) {
$redirect = "https://apps.facebook.com/".APP_NAME."/home.php";
} else {
$uri="https://apps.facebook.com/".APP_NAME."/home.php";
$redirect = "https://www.facebook.com/dialog/oauth/access_token?client_id=".APP_ID."&redirect_uri=".$uri;
}
?>
<script type="text/javascript">window.open('<?=$redirect?>', '_parent', '');</script>
</body>
</html>
我不知道发生什么。
我曾与指数相同的代码另一个应用程序Ë它的工作pefectly
你能帮助我吗?