google-api - 弃用属性 "googlePlusUserId"的任何替代品?

标签 google-api youtube youtube-api

正如您在 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/

相关文章:

java.net.SocketTimeoutException : Read timed out while downloading google spreadsheet

c# - 如何在没有 Auth 的情况下连接到 YouTube API?

Python 将变量输出拆分为多个变量

angular - Angular 2在背景上播放静音的youtube视频

youtube - 视频门户是否支持mpeg2-ts容器格式

javascript - gapi.client.youtube 未定义?

youtube - youtube 提要的预期延迟?

google-app-engine - 为什么在 appengine 中使用 Google API Python 客户端和 GAE_USE_SOCKETS_HTTPLIB 会导致 ResponseNotReady

xml - 谷歌通讯录 API : Unauthorized 401 Unknown authorization header

google-analytics - Google 表格中的 Google Analytics API(实时)