Skip to content

Commit

Permalink
L 5.4 support (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMatters authored and jhaoda committed Jan 26, 2017
1 parent 095371a commit da87c66
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}],
"require": {
"php": "^5.6 || ^7.0",
"socialiteproviders/manager": "~2.0"
"socialiteproviders/manager": "~3.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ protected function getUserByToken($token)
'fields' => 'uid,name,first_name,last_name,birthday,pic190x190,has_email,email'
];

ksort($params);
ksort($params, SORT_STRING);

$_params = array_map(function($key, $value) {
return $key . '=' . $value;
}, array_keys($params), array_values($params));

$params['sig'] = md5(join('', $_params) . md5($token . $this->clientSecret));
$params['sig'] = md5(implode('', $_params) . md5($token . $this->clientSecret));
$params['access_token'] = $token;

$response = $this->getHttpClient()->get(
Expand Down

0 comments on commit da87c66

Please sign in to comment.