Hello. I’m trying to delete a status, using Python and the TwitterAPI package. Once authenticated, I have no problem tweeting via the API or destroying favorites. However, when I try to delete a tweet or unretweet a tweet, I get 404 errors. I can successfully do all these things through the gui web interface.
My code:
from TwitterAPI import TwitterAPI
api = TwitterAPI(API_KEY, API_SECRET, ACCESS_TOKEN, ACCESS_SECRET)
r = api.request(‘statuses/destroy/:id’, { ‘id’: tweet_id })
r.status_code
404
r.text
’{“errors”:[{“message”:“Sorry, that page does not exist”,“code”:34}]}’
( tweet_id above is an int populated elsewhere. Yes, it’s the value I’m expecting. )
I see in older threads this issue has happened before, but I have not seen a satisfactory reason it happens or what I can do.
Do you know why I can’t destroy tweets or unretweet tweets via the API?
Thanks!