为什么我的Facebook访问令牌突然停止工作? "OAuthException:验证访问令牌时出错." [英] Why has my Facebook access token suddenly stopped working? "OAuthException: Error validating access token."

查看:77
本文介绍了为什么我的Facebook访问令牌突然停止工作? "OAuthException:验证访问令牌时出错."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个iframe Facebook应用程序,该应用程序使用Facebook PHP SDK进行身份验证并进行api调用.身份验证期间,系统会提示用户输入基本信息和脱机访问.如果它们允许我的应用程序访问,Facebook将它们重定向回我的应用程序,并提供一个会话数组,该会话数组包含access_tokenexpires0.此时,我将该会话数组保存到数据库中,并在随后的页面上将其获取并将其传递给$facebook->setSession().之后,我进行api调用.昨晚对我来说一切正常,然后今天早晨刷新浏览器时,出现以下异常: OAuthException: Error validating access token.

I have an iframe Facebook application that uses the Facebook PHP SDK to authenticate and make api calls. During authentication, the user is prompted for Basic Info and Offline Access. If they allow my app access, Facebook redirects them back to my app and provides a session array, which contains access_token and an expires value of 0. At this point I save this session array to the database, and on subsequent pages, I fetch it and pass it to $facebook->setSession(). After that I make api calls. Everything was working fine last night for me, then this morning when I refreshed my browser, I get this Exception: OAuthException: Error validating access token.

我也尝试过不传递会话数组,而是直接将访问令牌传递给$facebook->api(),但遇到相同的错误.据我了解,由于已授予脱机访问权限,因此该访问令牌应始终有效.为什么突然停止工作的任何想法?

I've also tried not passing the session array, and instead passing the access token directly to $facebook->api() but I get the same error. From what I understand, this access token should always be valid because of the offline access permission that was granted. Any ideas why this would suddenly stop working?

推荐答案

这可能是因为Facebook的访问令牌存在问题.该问题已在几个小时前解决.在此处查看更多详细信息: http://developers.facebook.com/live_status

This could be caused by an issue that Facebook was having with access tokens. The issue was solved a few hours ago. See more details here: http://developers.facebook.com/live_status

这篇关于为什么我的Facebook访问令牌突然停止工作? "OAuthException:验证访问令牌时出错."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆