我收到应用程序名称发生错误。请稍后再试。我的应用程序 ID、秘密 ID 和重定向 url 是正确的仍然收到此错误
我的代码是这个
<?php
require $DOCUMENT_ROOT.'/temp/socialtest/src/facebook.php';
// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(
array(
'appId' => 'XXXXXXXXXXX',
'secret' => 'XXXXXXXXXXX',
)
);
// Get User ID
$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;
}
}
// Login or logout url will be needed depending on current user state.
if($user)
{
$logoutUrl = $facebook->getLogoutUrl();
echo $user_profile['id'];
echo $user_profile['email'];
echo $user_profile['user_birthday'];
echo $user_proile['gender'];
}
else{
$param = array();
$param['scope'] = array('email');
$loginUrl = $facebook->getLoginUrl($param);
echo "<a href='".$loginUrl."'><img src='fb-login-button.png'></a>";
}
?>
告诉我哪里做错了一切都很好
问题已解决,但现在我想要弹出窗口中的身份验证框,我该怎么做