为什么我可以通过这个url正确地使用https://developers.facebook.com/tools/explorer/发布:
https://graph.facebook.com/me/og.likes?object=http://guidepal.com/escape/30?access_token=xxx
其中xxx是有效的访问令牌,即使使用确认也是如此
https://developers.facebook.com/tools/debug/
但是当我尝试直接在浏览器url上使用它时,我得到了json响应:
{
"error": {
"message": "An active access token must be used to query information about the current user.",
"type": "OAuthException",
"code": 2500
}
}我猜这是因为这不是一个正确的POST请求。但我尝试使用hurl.it,它不工作,尝试使用我的代码为iPhone应用程序,仍然是相同的响应。只有当我使用浏览器工具时,它才能真正工作。
为什么会这样呢?
发布于 2012-08-30 23:26:27
为什么我可以使用…正确发帖?此url:
https://graph.facebook.com/me/og.likes?object=http://guidepal.com/escape/30?access_token=xxx
我敢打赌,你不能使用这个网址发布-因为查询字符串中的name=value对是用&分隔的,而不是你在网址中使用的第二个?。
对于您的URL,您只提供了一个值为http://guidepal.com/escape/30?access_token=xxx的object参数-所以难怪API会抱怨您没有提供access_token,因为实际上您没有提供。
https://stackoverflow.com/questions/12198260
复制相似问题