We are developing an automatic reply program in Japan.
When the user RT a specific tweet of an account, it sends a reply to the user from that account.
The API used for replying is as follows.
POST statuses / update
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update.html 2
In this program, the account reply within a few seconds after RT, but when @replying, it is judged that that user who should have done RT a few seconds ago is not already on Twitter.
And the @reply happend to be displayed as normal tweets on the timeline of all followers.
The probability is about 0.01%, but if you reply 10,000 messages, about 1 happens, and if you reply quite a number, personal reply will be displayed to all followers in proportion to it.
Normally @ reply is a link of the user name, but if it is regarded as a nonexistent user name, this is not a link, it is treated as a normal character string. As a result, it is treated as a regular tweet, and it is displayed on the timeline of all followers.
If you search by user name which became a character string, users may be found. However, it may already be displayed as a different @ user name, even though the @ user name has already changed and may be found in the search.
How can we respond to this as a @reply rather than a regular tweet? If it does not become a @reply, will it be possible to consider a workaround such as making the process fail?
By the way, it seems that the targeted users are not Protected or Spam accounts.
And even when we check if the user exists before we send reply by using user/lookup, it happens sometimes.
GET users/lookup
https://developer.twitter.com/en/docs/accounts-and-users/follow-search-get-users/api-reference/get-users-lookup.html