【问题标题】:Error using Facebook Graph api to get email, name?使用 Facebook Graph api 获取电子邮件、姓名时出错?
【发布时间】:2015-04-23 04:16:52
【问题描述】:

我在 Android 中创建了与 Parse.com 集成的应用程序,用于 Facebook 和 twitter 集成。

我使用 ParseFacebookUtils 登录 Facebook,它给了我会话访问令牌,而我又用它来调用图形 API。

之前它起作用了。

但现在我收到以下错误:

  Authentication error: Unable to respond to any of these challenges: {oauth=WWW-Authenticate: OAuth "Facebook Platform" "invalid_token" "Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons."}

    04-22 21:35:17.631: W/msgr(:<default>):k(30067): com.facebook.http.protocol.e: [code] 190 [message]: Error validating access token: Session does not match current stored session. This may be because the user changed the password since the time the session was created or Facebook has changed the session for security reasons. [extra]: 

这是我进行的图形 API REST 调用:

https://graph.facebook.com/v2.1/me?email,name&access_token=<access-token>

如果我使用来自 Graph API 资源管理器的相同图形 API,它会返回值,但不会来自之前工作的应用程序。

[我几天前更改了密码,但它的登录和存储用户要解析但没有得到图形 API 的响应]

【问题讨论】:

  • 您的访问令牌似乎已过期或因密码更改而失效。 (我假设当您在 Graph API Explorer 中尝试此请求时,您没有使用相同的访问令牌,而是 GAE 自动提供的访问令牌?)所以您需要再次通过登录流程,以获得新的令牌。
  • 我尝试为我的 Facebook 应用程序清除缓存.. 也尝试使用其他帐户:(
  • 清除了您的应用数据? ParseUser 将自身存储在应用程序数据中。不是缓存

标签: android facebook facebook-graph-api parse-platform


【解决方案1】:

尝试使用另一个 facebook 帐户,如果有效,您必须为更改密码的帐户更新令牌。

您是否尝试在您的应用中使用其他帐户登录?

【讨论】:

  • 报错还是一样?那 你的代码是怎么写的?
  • 访问令牌是字符串.. 它只是替换 令牌
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-04-06
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多