Twitter bot with mentions

restapi
api
bots

#1

Hi,
How are you?
I want to make a twitter bot.
I have a list of screen name’s user and I want to make each them a question with a tweet with a mention something like it.
users = [user1,user2,userN]
for user in users:
tweet = makeTweet(user)
update.status(tweet)

where tweet looks like = “Hi @user1, how are you?”

I have different questions(how are you, which is your favourite team?) and I tweet in different times (wait between 10 minutes and 15 minutes to make a new tweet).

But twitter makes my twitter app with the following: “Restricted from performing write actions”

How can I resolve it?
I am making that bot for my thesis.
I have a web page and the users know that I am going to ask them some question.
I don’t follow them.

Thank you!


#2

That is probably because you’re hitting an antispam rule in our algorithms about sending automated replies and responses. Unsolicited mentions are bad behaviour. We’re not able to document the specific algorithms in detail, but you should avoid unsolicited @mentions. If users do not reply or mark your Tweets as spam this may cause you to be restricted. You might find it better to have a follow/follow-back relationship with the users and potentially use direct messages.

You should be able to remove the restriction on your app yourself by going via https://support.twitter.com/forms/platform but you’ll need to modify the behaviour to avoid this in the future.


#3

Great,
Thank you
Do you mean if I follow a user, and then he also follow me, I can send direct messages without been detected as spam?
How much users I can follow in a day with the bot?
Thank you


#4

If you are sending a lot of DMs etc you may still be seen as problematic. I was just suggesting an alternative method of writing your app.

You can find out about follow limits on the support pages. Note that aggressive automated following is also likely to cause you issues.