UWP是否支持Google的FileDataStore?

时间:2017-03-13 14:28:42

标签: c# youtube-api uwp google-api-dotnet-client youtube-data-api

我正在使用Youtube api v3并需要FileDataStore(Google.Apis.Util.Store.FileDataStore)。我有所有必要的使用指令和NuGet包,但我仍然得到“无法找到类型或命名空间名称'FileDataStore'错误。

相同的代码适用于Winforms和WPF。 UWP中不支持FileDataStore吗?有解决方法吗?

  UserCredential credential;
            using (var stream = new FileStream("client_secrets.json", FileMode.Open, FileAccess.Read))
            {
                credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
                    GoogleClientSecrets.Load(stream).Secrets,
                    // This OAuth 2.0 access scope allows for full read/write access to the
                    // authenticated user's account.
                    new[] { YouTubeService.Scope.Youtube },
                    "user",
                    CancellationToken.None,
                    new FileDataStore(this.GetType().ToString())
                );
            }

1 个答案:

答案 0 :(得分:1)

Google .Net client library目前不支持UWP。

我们希望在v2版本中支持UWP,但是遇到了一些问题。有关v2的详细信息,请参阅#787

我们没有特定的时间表来处理本机/ UWP支持(包括#838)。这将是几周/几个月的问题。