Facebook graph api GraphAPIError:验证访问令牌时出错:会话与当前存储的会话不匹配。这可能是因为用户更改了密码

Facebook graph api GraphAPIError:验证访问令牌时出错:会话与当前存储的会话不匹配。这可能是因为用户更改了密码,facebook-graph-api,mobile,Facebook Graph Api,Mobile,如果我在手机上的应用程序中使用graph API检索用户事件,则会出现以下错误: GraphAPIError: 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

如果我在手机上的应用程序中使用graph API检索用户事件,则会出现以下错误:

GraphAPIError: 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.
但如果我不久后再次尝试,它会起作用。如果我等待太长时间(几个小时),这个问题会再次出现

我的Python代码是:

graph = facebook.GraphAPI(access_token=TOKENS["user_token"])

time.sleep(0.6) # to deal with Graph API latency, although problem is visibly not here

event = graph.get_object(id=event_id, fields='attending_count,declined_count,interested_count,is_viewer_admin,is_page_owned, owner,name')
任何东西都可以用台式计算机工作