Fix for destroyStatus() method returning consistent 404's - properly initiate POST, fix url to reference properly, always require string instead of number for tweet id

This commit is contained in:
Ryan McGrath 2010-01-10 15:28:46 -05:00
parent 0e878ce75d
commit 08c0200020

View file

@ -608,7 +608,7 @@ class setup:
version = version or self.apiVersion
if self.authenticated is True:
try:
return simplejson.load(self.opener.open("http://api.twitter.com/%d/status/destroy/%s.json" % (version, `id`), "DELETE"))
return simplejson.load(self.opener.open("http://api.twitter.com/%d/statuses/destroy/%s.json?" % (version, id), "_method=DELETE"))
except HTTPError, e:
raise TwythonError("destroyStatus() failed with a %s error code." % `e.code`, e.code)
else: