MDL-61826 auth: Facebook OAuth2 - getting a better-quality profile photo

Get 200x200 px instead of 50x50 px user profile picture from Facebook OAuth2.
This commit is contained in:
Łukasz Szeremeta 2018-04-02 23:03:38 +02:00 committed by Jun Pataleta
parent 5b4ca9eb5b
commit ac45c16544

View File

@ -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) {