samedi 23 mai 2020

How to test tweeting via Twitter API (e.g. via Tweepy) without tweets showing to followers

I have built a Twitter bot using Tweepy that tweets automatically.

I am now refactoring code but cannot figure out how I can do integration tests without tweets showing to my existing followers.

The API itself doesn't seem to specify a "test" flag, that when set doesn't tweet publicly. There's a sandbox, but it seems to be only for the Ads API.

The only solution I can think of is to create a second developer account with the sole purpose of publishing test tweets for my production account.

Is there another way? Or is this the best that's possible? While testing in production works when you don't have any followers yet, I don't want to broadcast test tweets to a thousand people. How have people with experience solved this testing issue?

Aucun commentaire:

Enregistrer un commentaire