【发布时间】:2015-07-04 22:13:47
【问题描述】:
我正在使用 Chrome 的 Postman 扩展来学习 Rest web 服务。我正在使用 Facebook API 练习它。我有一个关于在 FB 上发帖的问题。
使用的 URI:https://graph.facebook.com/me/feed?
在POST方法的Body中,我给出了如下Json内容
{
"message": "hello",
"access_token": "<a valid token>"
}
我非常确定我的访问令牌是正确的,因为当我使用上述 URI 附加访问令牌和消息时,状态会成功发布。此外,当我将它用作“x-wwww-form-urlencoded”部分中的键值对时,它工作正常。
但是当我尝试使用带有上述 JSON 内容的 POST 方法的 Body 来更新状态时,它告诉
{ "error": { "message": "An active access token must be used to query information about the current user.", "type": "OAuthException", "code": 2500 } }
JSON内容的格式有什么问题
【问题讨论】:
标签: web-services rest facebook-graph-api