Skip to content

Commit

Permalink
Facebook fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgraham committed May 21, 2017
1 parent f728e08 commit 686d09c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sources_custom/facebook/facebook.php
Expand Up @@ -677,13 +677,11 @@ protected function getAccessTokenFromCode($code, $redirect_uri = null) {
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_params['access_token'];
return $response->access_token;
}

/**
Expand Down

0 comments on commit 686d09c

Please sign in to comment.