弃用的属性"googlePlusUserId"是否可以替代? [英] Any alternatives of deprecated property "googlePlusUserId"?

查看:65
本文介绍了弃用的属性"googlePlusUserId"是否可以替代?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如您在Youtube API修订历史中所见:

As you can see in Youtube API revision history:

不推荐使用频道资源的contentDetails.googlePlusUserId属性.以前,只有在频道与Google+个人资料相关联的情况下,该属性才存在.弃用后,该属性将不再包含在任何渠道资源中.

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.

那么,我怎么能知道哪个Google帐户与Youtube频道相关?

So, how can I understand wich Google account relates to a Youtube Channel?

推荐答案

我唯一想到的选择是调用 人们:得到,将我用作用户ID.这将为您提供当前用户的ID.

The only option that I can think of would be to call People: get using me as the userid. This will give you the id of the current user.

人们:得到

获取某人的个人资料.如果您的应用使用范围 https://www.googleapis.com/auth/plus.login,保证此方法返回ageRange和语言.立即尝试或查看示例.

Get a person's profile. If your app uses scope https://www.googleapis.com/auth/plus.login, this method is guaranteed to return ageRange and language. Try it now or see an example.

如果使用userId值"me",则此方法需要使用已被授予OAuth范围 https://www.googleapis.com/auth/plus.me .了解有关OAuth的更多信息.

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. Read more about OAuth.

GET https://www.googleapis.com/plus/v1/people/me

这将需要其他身份验证范围.

This will require an additional authentication scope.

如果使用userId值"me",则此方法需要身份验证 使用已被授予OAuth范围的令牌 https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.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

这篇关于弃用的属性"googlePlusUserId"是否可以替代?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆