是否可以在没有身份验证的情况下从 PHP 读取 Google+ 用户名?

Is it possible to read Google+ username from PHP without Authentication?

我希望我的网页显示 "Welcome, [Google+ name here]!" 所以我一直在寻找解决方案并检查是否可以在不要求 him/her 通过 Google+.

登录我的网站的情况下做到这一点

四处寻找,我发现了一些库:

  require_once 'google-api-php-client/apiClient.php';
  require_once 'google-api-php-client/contrib/apiOauth2Service.php';

这些对我的目的有用吗?主要问题是:我想做的事情是否可行(提示?)?

提前致谢。

不,那不可能。如果您想知道用户是谁,您必须让他们通过登录或使用允许您查询他们的基本个人资料信息的 OAuth 范围提供对该信息的访问权限。