I am attempting to Unlike a Tweet using Pipedream an integration platform. When I hit Twitter’s API for Unlike a Tweet, I get an 404. I double checked and the URL is the same as in the documentation.
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,
}
};
As you can see, the URL from that code is the one specified in the documentation at https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-favorites-destroy
Any advice on how to get this corrected?
2
Answers
Here’s my code to get around that
Are you sure that the Tweet ID you’re passing as a parameter is correct? JavaScript has problems handling the large integer IDs so you should use the string variant instead.