问题
I am following this tutorial from last year, which teaches how to use Login with google for your website and get basic user info. In tutorial they are using Google_Oauth2Service class, which I could not find in PHP client library I downloaded.
There is a similar service named oAuth2 but it seems to require Google+ account. I do not want to use Google+ service.
回答1:
The easiest thing to use is the Plus API, with the people.get function: https://developers.google.com/+/api/latest/people/get. The function will work for all users as long as you request the profile
scope - they don't have to have Google+ profiles or have granted the https://www.googleapis.com/auth/plus.login
scope.
来源:https://stackoverflow.com/questions/29616741/which-would-be-right-service-to-use-in-php-client-library-for-google-to-get-basi