私はテストを使用しています:
https://developers.google.com/+/api/latest/people/get
https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get
公開されているにもかかわらず、どちらもユーザーの性別を返しません。
また、OAuth 2.0 を有効にしようとしましたが、まだうまくいきません。
何か案は?
私はテストを使用しています:
https://developers.google.com/+/api/latest/people/get
https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get
公開されているにもかかわらず、どちらもユーザーの性別を返しません。
また、OAuth 2.0 を有効にしようとしましたが、まだうまくいきません。
何か案は?
この情報は/oauth2/v1/userinfo APIから入手できます。
OAuth 2.0 スコープを含める必要があります: https://www.googleapis.com/auth/userinfo.profile
.
エンドポイントから情報を取得できます。
https://www.googleapis.com/oauth2/v1/userinfo?access_token={accessToken}
公式ドキュメント: https://developers.google.com/accounts/docs/OAuth2Login#userinfocall
API エクスプローラー: https://developers.google.com/apis-explorer/#p/oauth2/v2/oauth2.userinfo.get
https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get?userId=114452557602978803926&_h=1&を見ると、 people.get を使用できることがわかります。 () を使用して、その情報を公開しているユーザーの性別を取得します。