geduldig / TwitterAPI

Minimal python wrapper for Twitter's REST and Streaming APIs
939 stars 263 forks source link

Help with Self Replying #140

Closed reuning closed 4 years ago

reuning commented 4 years ago

This might be an issue with the API or with twitter in practices but I am sort of lost as to where to get help. I developed a bot where I post twitter threads of OSHA complaints around covid. I break apart the comments into a variety of smaller tweets and then post them using:

tweet_id = 0
for tweet in message:
    if tweet_id ==0:
        r = api.request('statuses/update', {'status': tweet})
    else:
        tweet = "@workingwcovid " + tweet
        r = api.request('statuses/update', {'status': tweet, 
                                            'in_reply_to_status_id':tweet_id})

    tweet_id = r.json()['id']
    time.sleep(1)

The problem is that if you click through on twitter you don't see the replies. It either doesn't show replies or if you click on a reply to a tweet it lists it as replying to: 'This Tweet is unavailable. Learn more'

Examples:

Again, this might just be twitter thinking this is a spam bot, if so I apologize for bothering you. I just want to make sure there is nothing wrong with the code.

geduldig commented 4 years ago

I would begin by getting rid of the for loop so you can test statuses/update with a single tweet. That should work if your code is correct.

reuning commented 4 years ago

I'm now 100% certain that this is just the account getting caught in a spam filter so I will close this. Thanks though.