用google登录获取大型个人资料图片

Gau*_*ava 2 javascript google-login

我正在使用此代码在我的网站中使用谷歌登录.

<script src="https://apis.google.com/js/platform.js" async defer></script>
<div class="g-signin2" data-onsuccess="onSignIn"></div>

<script>
function onSignIn(googleUser) {
  var profile = googleUser.getBasicProfile();
  console.log('ID: ' + profile.getId()); // Do not send to your backend! Use an ID token instead.
  console.log('Name: ' + profile.getName());
  console.log('Image URL: ' + profile.getImageUrl());
  console.log('Email: ' + profile.getEmail());
}
</script>
Run Code Online (Sandbox Code Playgroud)

但我正在控制台中获取小型配置文件.如何从谷歌获取最大的个人资料图片网址?

Ola*_*Sau 7

将查询参数添加到imageurl?sz = x,其中x是您的图像大小.

在这里基本回答

从Google+ API检索个人资料图片