連続での投稿ですみません。。。
English follows
日本で自動返信プログラムを開発しております。
ユーザーがあるアカウントの特定ツイートをRTするとそのアカウントからユーザーに@返信を送信するという仕組みです。
返信に利用しているAPIは以下のものです。
POST statuses/update
https://developer.twitter.com/en/docs/tweets/post-and-engage/api-reference/post-statuses-update.html
こちらのプログラムでは、ユーザーがRTをしてから実質数秒以内で返信をしているのですが、@返信したときには、数秒前にRTをしたはずのそのユーザーが既にTwitter上にいないと判断されて、@返信が通常ツイートとして、フォロワー全員のタイムラインに表示されてしまうという事象が起きております。
確率は0.01%程度なのですが、1万通返信すると1通程度は起きてしまい、かなりの数を返信する場合には、それに比例してフォロワー全員に個人的な返信が表示されてしまいます。
通常@返信は、最初のユーザー名がリンクになっているのですが、存在しないユーザー名とみなされた場合には、ここがリンクにならず、通常の文字列という扱いになってしまい、その結果、通常ツイートとして扱われ、フォロワー全員のタイムラインに表示されています。
文字列になってしまった@ユーザー名で検索してみるとユーザーが見つかる場合もあります。ただ、既に@ユーザー名が変わっており、検索では見つかる場合があるものの別の@ユーザー名として表示されることもあります。
これはどのように対処すると通常ツイートではなく、@返信として返信することができるでしょうか?@返信にならない場合は、処理を失敗させるなどの回避策も検討できそうでしょうか?
ちなみに対象となっているユーザーは Protectedや、Spamアカウントにはなっていなさそうです。
Title
Sometimes @Reply is treated as a regular tweet and appears on the follower timeline
■ Text
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
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.