Commit 2da5fd73 by ProThoughts Committed by GitHub

Facebook login issue #510

@Scott, @pupi1985

This fix is written and verified by http://question2answer.org/qa/user/Dan+D. in below thread http://question2answer.org/qa/56966/facebook-login-stopped-working-its-not-even-working-your-site?show=56992#a56992
also see https://github.com/q2a/question2answer/issues/510

I'm just submitting code changes.

Please check line no 593 for currentUrl. 

Thanks to Q2A user Dan D, and Github users valan, iamdand, cksagherian for this patch.
parent a8d607d1
......@@ -372,18 +372,17 @@ abstract class BaseFacebook
return false;
}
$response_params = array();
parse_str($access_token_response, $response_params);
if (!isset($response_params['access_token'])) {
$response = json_decode($access_token_response);
if (!isset($response->access_token)) {
return false;
}
$this->destroySession();
$this->setPersistentData(
'access_token', $response_params['access_token']
'access_token', $response->access_token
);
}
/**
......@@ -789,13 +788,12 @@ abstract class BaseFacebook
return false;
}
$response_params = array();
parse_str($access_token_response, $response_params);
if (!isset($response_params['access_token'])) {
$response = json_decode($access_token_response);
if (!isset($response->access_token)) {
return false;
}
return $response->access_token;
return $response_params['access_token'];
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment