使用客户经理获取OAuth令牌

时间:2012-05-09 08:11:41

标签: android oauth

我正在尝试使用AccountManager通过以下代码获取Auth令牌:

Account account = ...;
accountManager.getAuthToken(account, "ah", false,
            new AuthTokenCallback(), null);
accountManager.getAuthToken()

此令牌对OAuth有效吗?或者它是一个不同的标记??

谢谢!

1 个答案:

答案 0 :(得分:0)

我认为对于OAuth,您必须使用“oauth2:URL_OF_THE_SERIVE”而不是“啊”。

服务的可能网址(以获取用户信息,例如电子邮件地址)为:https://www.googleapis.com/auth/userinfo.email

相关问题