Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save caaheek/1c6b98397da47ffb2b0625a36f280e3e to your computer and use it in GitHub Desktop.
Save caaheek/1c6b98397da47ffb2b0625a36f280e3e to your computer and use it in GitHub Desktop.
diff --git a/app/addons/hybrid_auth/lib/Hybrid/thirdparty/Facebook/base_facebook.php b/app/addons/hybrid_auth/lib/Hybrid/thirdparty/Facebook/base_facebook.php
index b0d9ef9..81af2dc 100644
--- a/app/addons/hybrid_auth/lib/Hybrid/thirdparty/Facebook/base_facebook.php
+++ b/app/addons/hybrid_auth/lib/Hybrid/thirdparty/Facebook/base_facebook.php
@@ -837,13 +837,11 @@ 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_params['access_token'];
+ return $response->access_token;
}
/**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment