我试图不像一条推特那样使用Pipedream作为一个集成平台。当我点击Twitter的API for Unlike a Tweet时,我得到了404。我仔细检查了一下,URL与文档中的相同。
const body = {
config: {
method: "post",
url: `https://api.twitter.com/1.1/favorites/destroy.json`,
params : {
id : params.id,
include_entities : params.include_entities
},
},
token: {
key: auths.twitter.oauth_access_token,
secret: auths.twitter.oauth_refresh_token,
}
};如您所见,该代码的URL是在https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-favorites-destroy的文档中指定的URL。
对如何纠正这个问题有什么建议吗?
发布于 2020-08-23 05:17:16
您确定作为参数传递的推文ID是正确的吗?JavaScript在处理大整数ID时有问题,所以您应该改用字符串变量。
发布于 2020-08-11 08:39:22
下面是我用来解决这个问题的代码
for (User users : Spigot.getUsers()) {
if (users.getKnowledgeLevel(KnowledgeTopic.JAVA_CODING) <= 5) {
users.getPlayer().getInventory().addItem(new ItemStack(Material.JAVA_BOOK, 1));
}
}https://stackoverflow.com/questions/63349858
复制相似问题