如果我使用 curl 命令进行发布,一切正常:
curl \
-F 'access_token=...' \
-F 'message=hello' \
https://graph.facebook.com/me/feed
回应是:
{"id":"100001692713927_542460169153735"}
但是从 NodeJs 使用request模块进行 POST 也是如此:
var formData = {
access_token: '...',
message: 'hello5'
};
request.post('https://graph.facebook.com/me/feed', formData, function (error, response, body) { … });
我得到错误:
{
"error": {
"message": "(#200) This API call requires a valid app_id.",
"type": "OAuthException",
"code": 200
}
}
我同时使用me
了 URL 中的用户 ID 和行为是相同的。
这里有什么问题?