我正在使用this对于我的 Node 应用程序。
我可以使用脚本获取 token ,并且让 /me
正常工作。但是当我尝试获取 me/accounts?fields=name,id&limit=1000
时,出现错误。
An active access token must be used to query information about the current user.
我测试我的 token here我得到了以下结果。
App ID foo : bar
User ID 10153192307109460 : Krister Johansson
User last installed this app via API v2.x
Issued 1440597064 (about a minute ago)
Expires 1445781064 (in about 2 months)
Valid True
Origin Web
Scopes manage_pages, publish_pages, publish_actions, public_profile
如果我在 Graph API Explorer 中测试我的 token ,我不会收到任何错误,并且它会列出我的帐户。
最佳答案
你有吗
FB.setAccessToken('YOUR_ACCESS_TOKEN');
在进行调用之前,其中 YOUR_ACCESS_TOKEN
是您代码中的实际访问 token ?
如果是这样,检查参数的传递是否像
FB.api('me/accounts', { fields: ['id', 'name'], limits: 1000 }, function (res) { ... });
请记住,该模块已有两年多的历史,很可能无法反射(reflect)最新的图形 API 更改。
关于node.js - Facebook "active access token must be used",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32228906/