我正在使用Twitter npm模块,并使用类似
的内容发布到favorites/destroy.json
或favorites/create.json
favorites/destroy.json?id=800364979287425024
我得到{ code: 96, message: 'Narrowcast id params must be integers.' }
。有谁知道发生了什么事? Twitter API文档中没有任何内容。
我尝试使用和不使用引号发送ID,但没有运气。
答案 0 :(得分:4)
问题是我发送id
作为查询参数,而不是POST主体。 Twitter documentation for the route包含使用查询参数而不是帖子正文的错误示例代码。
像这样的身体有效。
{ id: 800364979287425024 }