问题描述
我在问你的帮助,因为我不明白我在做什么错。我试图让被Facebook二次用户验证我的应用程序。
I'm asking you for help, because I can't understand what I'm doing wrong. I was trying to make secondary user authentication by Facebook for my application.
我已经根据此博客条目所做的一切:
的
I had done everything according to this blog entry:http://thinkdiff.net/facebook/php-sdk-3-0-graph-api-base-facebook-connect-tutorial/
和一次验证了罚款,并自其他时间我有错误:
发生错误,请稍后再试。
and once verification went fine and since another time I have error:"An error occurred. Please try again later."
我甚至不能得到错误或任何信息的原因。似乎一切都OK。但我无法通过验证获得。当我使用FB loginUrl我重定向我错误。
I can't even get cause of error or any message. Everything seems to be OK. But I can't get through verification. When i use FB loginUrl i redirects me to error.
这是我的FB code:
This is my FB code:
var $fbconfig = array(
'appId' => '1234567890',
'secret' => '12345678901234567890',
'baseurl' => "http://xxxx.xx",
'fbLoginSuccess' => "http://xxxx.xx/xx/xxxx",
'cookie' => true
);
$facebook = new Facebook(
array(
'appId' => $fbconfig['appId'],
'secret' => $fbconfig['secret'],
'cookie' => $fbconfig['cookie'],
)
);
$userFB = $facebook->getUser();
if ($userFB) {
$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl(
array(
'scope' => 'email',
'redirect_uri' => $fbconfig['fbLoginSuccess']
)
);
}
我已经找到一种方法来接收通过 REDIRECT_URI
答案与 ERR_MSG
变量。然后找到一个解决方案在这里:
I had found a way to receive answer through redirect_uri
with err_msg
variable. And then found a solution here: http://developers.facebook.com/bugs/112163982233944
推荐答案
我已经找到了一种方法,通过与ERR_MSG变量REDIRECT_URI接收答案。然后找到一个解决方案在这里:。我没有注意到,我已变成沙盒模式的
I had found a way to receive answer through redirect_uri with err_msg variable. And then found a solution here: http://developers.facebook.com/bugs/112163982233944. I didn't notice that I had turned sandBox mode "on"
这篇关于Facebook的PHP SDK服务器时发生错误。请稍后再试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!