【问题标题】:Codename One - Recognize the same user with GoogleConnect代号一 - 使用 GoogleConnect 识别同一用户
【发布时间】:2018-07-14 12:14:16
【问题描述】:

我的问题是关于 GoogleConnect(代号为 One),但也许它也适用于 FacebookConnect。

问题是以下代码给了我一个每次都会改变的令牌:使用相同的 Gmail 用户名和密码,每次登录后我都会得到一个不同的令牌。那么...如何识别同一个用户?

String token = GoogleConnect.getInstance().getAccessToken().getToken();

【问题讨论】:

    标签: codenameone


    【解决方案1】:

    似乎我在最近的材料中犯了同样的错误。我需要更新该代码。

    正如这里所解释的How to get the Facebook user id using the access token

    您需要使用此查询 https://graph.facebook.com/me?fields=id&access_token="xxxxx" 获取用户 ID,这将是您可以存储的唯一 ID。

    【讨论】:

    猜你喜欢
    • 2014-11-17
    • 2015-10-03
    • 1970-01-01
    • 1970-01-01
    • 2020-08-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-13
    相关资源
    最近更新 更多