Twitter Error Can't send Tweet message.

What could be this mistake?

Could not post Tweet. Error: 403 Reason: Status is a duplicate. 

this is actually an edited post. I get an error code as 403 and Reason as Status is a duplicate .

+4
source share
4 answers

Twitter checks messages if they are duplicates of the previous one and does not accept them a second time.

So, for testing, you need to generate new messages each time (= content).

This is documented on Twitter, but you can also read about other sites .

+5
source

State is a duplicate, perhaps your script is executed twice without changing the status message.

Uninstall the latest status update via the Twitter website and run the script again. Or specify a date ('r') or md5 (mt_rand ()) with your status message to generate a different one each time you run the script.

+4
source

I also encountered the same error. that the twitter site says that they check the messages on Twitter and reject (discard) them if they are the same. The discussion here says to use different texts every time you tweet. Else uses a different account for tweets.

0
source
  import time, os, random, hashlib, datetime gettime = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") random_data = os.urandom(128) hash = hashlib.md5(gettime).hexdigest()[:8] twitterpost = "foo bar %s" % hash api.update_status(status=twitterpost) 
0
source

Source: https://habr.com/ru/post/1338095/


All Articles