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
你能幫助我嗎?