【问题标题】:I want to get google oauth2 token in android app我想在 android 应用程序中获取 google oauth2 令牌
【发布时间】:2014-09-21 05:01:09
【问题描述】:

按照this 教程,我开发了一个安卓应用程序。使用 google oauth 它将登录到 google+ 并获取个人资料名称和图像。现在我想获取 google oauth2 令牌,以便我可以将该令牌传递给 Web 服务以登录它。

【问题讨论】:

    标签: android oauth


    【解决方案1】:

    您使用GoogleAuthUtil 并将GoogleApiClient 对象作为参数提供给它。它有一个 GetToken 方法,您可以使用它从 Google 检索 OAuth2 令牌。 GoogleAuthUtil 页面有一个关于如何以阻塞和异步方式获取令牌的示例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-29
      • 2016-10-13
      • 2015-04-09
      • 2021-05-20
      • 2013-12-27
      • 2012-06-19
      • 1970-01-01
      相关资源
      最近更新 更多