Skip to content

Commit

Permalink
Fixed socailite login issue via Facebook
Browse files Browse the repository at this point in the history
Updating laravel socailite for fixing token parsing issue for facebook
  • Loading branch information
mverma16 committed May 23, 2017
1 parent 96e2196 commit 7075781
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vendor/laravel/socialite/src/Two/FacebookProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ protected function getAuthUrl($state)
*/
protected function getTokenUrl()
{
return $this->graphUrl.'/oauth/access_token';
return $this->graphUrl.'/'.$this->version.'/oauth/access_token';
}

/**
Expand All @@ -76,9 +76,7 @@ public function getAccessTokenResponse($code)
$postKey => $this->getTokenFields($code),
]);

$data = [];

parse_str($response->getBody(), $data);
$data = json_decode($response->getBody(), true);

return Arr::add($data, 'expires_in', Arr::pull($data, 'expires'));
}
Expand Down

0 comments on commit 7075781

Please sign in to comment.