Skip to content

Commit

Permalink
Revert Facebook picture access token changes
Browse files Browse the repository at this point in the history
  • Loading branch information
driesvints committed Dec 4, 2020
1 parent dc786c4 commit d43debe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Two/FacebookProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,15 +114,15 @@ protected function getUserByToken($token)
*/
protected function mapUserToObject(array $user)
{
$avatarUrl = $this->graphUrl.'/'.$this->version.'/'.$user['id'].'/picture?access_token='.$this->lastToken;
$avatarUrl = $this->graphUrl.'/'.$this->version.'/'.$user['id'].'/picture';

return (new User)->setRaw($user)->map([
'id' => $user['id'],
'nickname' => null,
'name' => $user['name'] ?? null,
'email' => $user['email'] ?? null,
'avatar' => $avatarUrl.'&type=normal',
'avatar_original' => $avatarUrl.'&width=1920',
'avatar' => $avatarUrl.'?type=normal',
'avatar_original' => $avatarUrl.'?width=1920',
'profileUrl' => $user['link'] ?? null,
]);
}
Expand Down

0 comments on commit d43debe

Please sign in to comment.