【发布时间】:2015-07-24 23:57:47
【问题描述】:
一旦我对用户进行了身份验证 - 例如在下面的代码中 - 我如何才能找到他们的频道名称和频道 URL?
我正在使用带有 .NET 库的 YouTube 数据 api v3:
UserCredential credential;
using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
{
credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { YouTubeService.Scope.YoutubeReadonly },
"user",
CancellationToken.None,
new FileDataStore(this.GetType().ToString())
);
}
var youtubeService = new YouTubeService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = this.GetType().ToString()
});
【问题讨论】:
标签: google-api google-oauth youtube-data-api