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."
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.
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']
)
);
}
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