Skip to content
This repository has been archived by the owner on Sep 8, 2023. It is now read-only.

Deleting Posts Doesn't work #323

Open
alhassanalbadri opened this issue Aug 31, 2023 · 2 comments
Open

Deleting Posts Doesn't work #323

alhassanalbadri opened this issue Aug 31, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@alhassanalbadri
Copy link

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.

@ishaanbuildsthings
Copy link

Can you post the code you use? getPostIDfromURL isn't even async

@alhassanalbadri
Copy link
Author

alhassanalbadri commented Aug 31, 2023

Can you post the code you use? getPostIDfromURL isn'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

@junhoyeo junhoyeo added the bug Something isn't working label Sep 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants