【发布时间】:2013-03-18 10:28:31
【问题描述】:
早安
经过身份验证确认我的应用无法运行。
直到几周前,该应用还运行良好。
在我的索引代码下方
$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>
我不知道会发生什么。
我在 Index e 中有另一个具有相同代码的应用程序,它运行良好
你能帮帮我吗?
【问题讨论】: