Commit c93f249a by Scott Committed by GitHub

Merge pull request #512 from ProThoughts/patch-3

Fix Facebook login issue #510
parents a8d607d1 2da5fd73
......@@ -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