【发布时间】:2017-09-30 04:11:06
【问题描述】:
直到一个月前,我还在使用 Rfacebook 库,没有任何问题。当我加载我生成的令牌并且我想使用一些功能时
getUsers("me",fb_oauth) #fb_oauth is my token
它给了我以下错误:
Error in callAPI(url = url, token = token) :
Error validating access token: Session has expired on Tuesday, 04-Apr-17 13:24:59 PDT. The current time is Tuesday, 02-May-17 06:33:21 PDT.
为了尝试解决它,我在应用程序中生成了一个新密码并生成了一个新令牌,然后我正确地获得了新令牌:
fb_oauth <- fbOAuth(app_id="12345678", app_secret="xxxx")
Copy and paste into Site URL on Facebook App Settings: http://localhost:1410/
When done, press any key to continue...
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
但是当我想使用相同的功能时,它给了我错误
Error in callAPI(url = url, token = token) :
An access token is required to request this resource.
Also configure the login in the app but it does not work either 有人知道如何使用新的 2.9 更新生成新令牌吗?
问候
【问题讨论】:
-
API v2.2 和 v2.3 之间的访问令牌返回格式发生了变化,并且 v2.2 已于 3 月底关闭 - 所以它可能与此有关。首先,请确保您了解您正在使用的软件包的最新信息。
-
感谢您的回复,我目前已安装并更新了所有软件包,但错误仍在继续
-
您是否指定要在该包的任何地方使用的 API 版本?
-
我遇到了完全相同的问题,但无法找到解决方案。我什至在 RFacebook 的创建者的 GitHub 上发布了一个问题,但还没有收到回复
-
感谢您的回答,但我仍然有错误。有人可以解决吗?
标签: r facebook-graph-api access-token