Deleting Posts Doesn't work
Hey so I was tinkering around with the library and found out the following:
If you try to delete a post right after publishing (like the example does) it works fine, but whenever you use getPostIDfromURL to get the postID and use that, then it doesn't work and it returns a 500 error.
Can you post the code you use? getPostIDfromURL isn't even async
Can you post the code you use?
getPostIDfromURLisn't even async
The issue is not in getPostIDfromURL, it is originated from the delete method.
The code is part of a bigger context but it is as follows:
const threadsClient = // assume this is an instance of threads.
const postID = threadsClient.getPostIDfromURL('placeholder'); // the code returns a valid post id, no issue here
await threadsClient.delete(postID); // the code throws the 500 here at this request
The request sent is as follows:
POST /api/v1/media/1188739602403146218596443867793401045807132630629409586704810983867956/delete/ HTTP/1.1
The web version of Threads is out by the way, there it sends a request to https://www.threads.net/api/graphql