如何通过ID销毁收藏的推文

时间:2019-05-04 12:30:29

标签: javascript node.js twitter

嘿,我正尝试通过API删除一些旧的收藏的推文。我无法在网站上将其删除,因为我被推特作者大声笑了

当我运行代码时,它说找不到具有此ID的tweet,因此我不知道如何使其起作用

if (rest.hasBody()) {
   //TODO this somehow fails to write a valid JSON String to the HTTP Body
   PrintWriter writer = http.getWriter();
   writer.append(rest.getBody.toJSONString());
   //Here the proper json string ends in the buffer of the writer
   writer.flush();
   writer.close();
}

我需要“不喜欢”一些推文,但是我在控制台上得到了它

T.post('favorites/destroy', {id: tweet id}, function(err, data, response) {
    if(err) {console.error(err); return;}
    console.log(data);
});

0 个答案:

没有答案
相关问题