From 148ef430152058543dceedb87f0feb8b88d6703d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Szeremeta?= Date: Mon, 2 Apr 2018 23:03:38 +0200 Subject: [PATCH] MDL-61826 auth: Facebook OAuth2 - getting a better-quality profile photo Get 200x200 px instead of 50x50 px user profile picture from Facebook OAuth2. --- lib/classes/oauth2/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classes/oauth2/api.php b/lib/classes/oauth2/api.php index 72d4e978540..179910da1f8 100644 --- a/lib/classes/oauth2/api.php +++ b/lib/classes/oauth2/api.php @@ -89,7 +89,7 @@ class api { $endpoints = [ 'authorization_endpoint' => 'https://www.facebook.com/v2.12/dialog/oauth', 'token_endpoint' => 'https://graph.facebook.com/v2.12/oauth/access_token', - 'userinfo_endpoint' => 'https://graph.facebook.com/v2.12/me?fields=id,first_name,last_name,link,picture,name,email' + 'userinfo_endpoint' => 'https://graph.facebook.com/v2.12/me?fields=id,first_name,last_name,link,picture.type(large),name,email' ]; foreach ($endpoints as $name => $url) {