0

私はテストを使用しています:

https://developers.google.com/+/api/latest/people/get

https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get

公開されているにもかかわらず、どちらもユーザーの性別を返しません。

また、OAuth 2.0 を有効にしようとしましたが、まだうまくいきません。

何か案は?

4

2 に答える 2

2

この情報は/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

于 2012-09-19T04:04:03.787 に答える
1

https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get?userId=114452557602978803926&_h=1&を見ると、 people.get を使用できることがわかります。 () を使用して、その情報を公開しているユーザーの性別を取得します。

于 2013-04-02T06:53:03.780 に答える