获取“验证访问令牌错误”从Facebook为一些用户 [英] Getting "Error validating access token" from Facebook for some users
问题描述
验证访问令牌时出错:会话有由于用户已更改密码或因为auth.expireSession被调用而被禁用。
工作流程如下:
-
通过Facebook授权请求
scope = offline_access,publish_stream
权限(如果当前用户没有已经授权) -
在服务器上进行一些工作(需要5-10分钟)
- p>尝试发布到用户的Facebook流
此代码适用于许多用户,但对于某些用户,我获取错误验证访问令牌
错误。它几个星期前开始经常发生,似乎停止了,现在又发生了很多。我肯定不会在我的最后调用 auth.expireSession
,而且在从授权到发布的5-10分钟窗口中,多个用户似乎不太可能会更改密码。有没有人知道可能导致这种情况?
无论何时收到此错误,您应该通过auth流程运行用户。用户或我们将使会话无效的原因有很多。我们在 https://developers.facebook.com/blog/post/上有一个操作方法500
I'm getting the following error from Facebook when trying to post to a users stream.
Error validating access token: The session has been invalidated because the user has changed the password or because auth.expireSession was called.
The workflow is as follows:
Authorize with Facebook requesting
scope=offline_access,publish_stream
permissions (if the current user has not already authorized)Do some work on the server (takes 5-10 minutes)
Attempt to publish to the user's Facebook stream
This code works for many users, but for some users, I get the Error validating access token
error. It started frequently happening a few weeks ago, then seemed to stop, and now happen a lot again. I'm certainly not calling auth.expireSession
on my end, and it seems unlikely that multiple users would be changing their password in the 5-10 minute window from authorizing to publishing. Does anyone know what might be causing this?
Anytime you get this error, you should run the user back through the auth flow. There are many reasons that either the user or we will invalidate a session. We have a how-to on this at https://developers.facebook.com/blog/post/500
这篇关于获取“验证访问令牌错误”从Facebook为一些用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!