Facebook的用戶飼料如果我做一個curl命令所有的出版工作正常:發佈從的NodeJS
curl \
-F 'access_token=...' \
-F 'message=hello' \
https://graph.facebook.com/me/feed
和響應是:
{"id":"100001692713927_542460169153735"}
但做同樣來自的NodeJS使使用POST的request模塊:
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
}
}
我在URL中使用了兩個me
和用戶ID,行爲也是一樣的。
這裏有什麼問題?
感謝您的提示!我也剛剛發現問題併發布了答案。 –