未捕获的 OAuthException:无效令牌:“me”已指定 ID
这对我来说是一个新问题,我不确定为什么会出现它。仅当我尝试使用 API 发布时间线操作时才会发生这种情况。我启用了新的身份验证,publish_actions 包含在权限列表中,并且我是管理员。我已卸载该应用程序,然后再次安装,以确保新的身份验证已通过。如果我用“me”运行任何其他查询,它会正常返回。但如果我尝试运行以下命令:
$facebook->api('/me/example:read?chapter=http://www.example.com/og.php?og=read&id=24131', '邮政');
我收到此错误:未捕获的 OAuthException:无效令牌:“me” 已指定 ID。
我在ajax中运行它,所以为了确保我有一个有效的access_token,我对它进行了var_dump并将该行更改为: $facebook->api('/me/friends');在这种情况下,我会得到朋友的有效输出。所以我不知道是什么导致了这个问题。我还每次都运行不同的 ID (URL),以确保它与发布两次的操作无关(即使我在第一次尝试时收到错误)。还有其他人看到这个吗?任何线索为什么会发生这种情况?
This is a new one to me, and I'm not sure why it is coming up. It only happens when I try to use the API to post a timeline action. I have the new Auth enabled, publish_actions is included in the permissions list, and I am the admin. I have uninstalled the app, and installed it again, to make sure the new auth has run through. If I run any other query with 'me', it will return just fine. But if I try to run the following:
$facebook->api('/me/example:read?chapter=http://www.example.com/og.php?og=read&id=24131', 'POST');
I get this error: Uncaught OAuthException: Invalid token: "me" An ID has already been specified.
I am running it in ajax, so to make sure I have a valid access_token, I have var_dumped it and changed the line to read: $facebook->api('/me/friends'); In which case, I get valid output of my friends. So I have no clue what is causing this issue. I have also run a different ID (URL) each time, to make sure it isn't related to an action being posted twice (even though I got the error on the first try). Anyone else seeing this? Any clue why this could be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来你有两个?查询字符串中的标记。您可能需要对查询字符串进行 urlencode。
It looks like you have two ? marks in your query string. You may need to urlencode the query string.