【问题标题】:Is Google's FileDataStore supported in UWP?UWP 是否支持 Google 的 FileDataStore?
【发布时间】:2017-08-03 14:46:34
【问题描述】:

我正在使用 Youtube api v3 并需要 FileDataStore (Google.Apis.Util.Store.FileDataStore)。我有所有必要的 using 指令和 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())
                );
            }

【问题讨论】:

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


    【解决方案1】:

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

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

    对于原生/UWP 支持(包括#838),我们没有具体的时间表。这将是几周/几个月的问题。

    【讨论】:

    • 谢谢。我很惊讶 UWP 还不支持。
    • 我们遇到了两个不同库之间的向后兼容性问题。它在要做的事情清单上,但我们没有支持它的时间框架。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-10
    • 1970-01-01
    • 2014-10-13
    • 2018-08-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多