1
我正在修改FBML畫布應用程序以使用新的PHP SDK和身份驗證代替舊的REST API。FBML畫布應用程序驗證
現在,我嘗試使用這個片段:如果我使用PHP頭功能相對不屬於任何URL
$me = null;
// Session based API call.
if ($session) {
try {
$uid = $facebook->getUser();
$me = $facebook->api('/me');
} catch (FacebookApiException $e) {
error_log($e);
}
}
// login or logout url will be needed depending on current user state.
if ($me) {
} else {
$loginUrl = $facebook->getLoginUrl(array('req_perms' => 'user_birthday, publish_stream, email'));
header('Location: '.$loginUrl);
}
不過,我得到這個錯誤:
Application Temporarily Unavailable
The URL [https://www.facebook.com/login.php?.........] is not valid.
Sorry, the application you were using is experiencing a problem. Please try again later.
如果我需要使用最新的PHP SDK對我的FBML畫布應用程序進行身份驗證,如何正確重定向到請求擴展權限的應用程序登錄頁面?