正如您在 Youtube API 修订历史中看到的:
The channel resource's contentDetails.googlePlusUserId property has been deprecated. Previously, the property was only present if the channel was associated with a Google+ profile. Following the deprecation, the property will no longer be included in any channel resources.
那么,我如何理解与 Youtube channel 相关的 Google 帐户?
最佳答案
我能想到的唯一选择就是打电话
People: get使用我作为用户标识。这将为您提供当前用户的 ID。
人:得到
获取某人的个人资料。如果您的应用使用范围 https://www.googleapis.com/auth/plus.login ,这个方法保证返回ageRange和语言。立即尝试或查看示例。
如果使用 userId 值“me”,此方法需要使用已授予 OAuth 范围 https://www.googleapis.com/auth/plus.login 的 token 进行身份验证或 https://www.googleapis.com/auth/plus.me .阅读有关 OAuth 的更多信息。
GET https://www.googleapis.com/plus/v1/people/me
这将需要一个额外的身份验证范围。
If using the userId value "me", this method requires authentication using a token that has been granted the OAuth scope https://www.googleapis.com/auth/plus.login or https://www.googleapis.com/auth/plus.me
关于google-api - 弃用属性 "googlePlusUserId"的任何替代品?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38241943/