The transition of the number of followers when the method introduced this time is practiced on the Bot HackathonPortal that automatically informs the hackathon holding information and it is operated for about 45 days is as follows. Will be.
This graph was measured with the Twitter marketing tool SocialDog.
The aggregation period will be from 2020/8/15 to 2020/9/29
. During this period, the number of followers increased ** 132 **.
The number of followers is still increasing.
Therefore, it seems that the content that we have practiced this time is effective in increasing the number of followers.
HackathonPortal is a bot that automatically collects and informs you about the latest hackathon events.
If you haven't followed HackathonPortal yet, please do so!
See here for technical details
In addition, the contents of the actual processing introduced this time are published here. hackathon_portal The process is mainly described in promote.rb, and .gitlab-ci.yml The command that is being executed repeatedly is described in (: //github.com/TakuKobayashi/hackathon_portal/blob/master/.gitlab-ci.yml). (This project runs on Rails) I will explain the detailed code in another article.
We are still doing trial and error, so the logic will continue to change.
This time, I will introduce the environment and how to operate the attempt to automatically increase the followers of Twitter.
First of all, please build an environment where Ruby and Rails work Make Rails and MySQL work together Run the following command to create the database and create the table
rails db:create
rails db:migrate
If it already contains data, execute the following command to reset the data
rails db:migrate:reset
Inject data that is actually working
rails db:seed
All the data that is actually working is managed by Git in the repository seeds The data injected this time is the one managed above and injected into the database.
In order to execute the following commands, it is necessary to register the Twitter API Key and Twitter account information.
.env.sample Copy the information to .env
and put the Twitter API Key in the following items respectively. Please enter the information for consumer_key
and consumer_secret
and the information for Twitter account information ʻaccess_token and ʻaccess_token_secret
.
.env
TWITTER_CONSUMER_KEY = ""
TWITTER_CONSUMER_SECRET = ""
TWITTER_BOT_ACCESS_TOKEN = ""
TWITTER_BOT_ACCESS_TOKEN_SECRET = ""
Execute the following command to inject new additional data
rails runner Promote.import_twitter_routine!
You can also inject data with the following command. (The purpose of the following command is to get the information of the hackathon event from Twitter, and in the process, we also get the data of the tweet to be liked
)
rails runner Event.import_events_from_twitter!
In the injected data, the information of the tweets to be liked from now on is injected. Please execute the following command for the process to like the target tweet
rails runner Promote.like_major_user!
If you want to follow the users who meet the conditions, please execute the following command
rails runner Promote.try_follows!
Execute the following command to unfollow users who meet the conditions.
rails runner Promote.organize_follows!
If you want to write the data currently contained in MySQL to a SQL file, execute the following command.
rails backup:export_active_records_data
We are trying to increase the number of followers on Twitter by executing the commands listed above on a regular basis every day.
I referred to the following article
There were several other articles that showed how to get Twitter followers. According to a certain rule, I decided to examine how to increase the number of followers on Twitter by repeating it every day, and at the same time, try to automate these methods.
Also, I decided to apply it to something that leads to improvement of recognition and transmission power by increasing followers, so I tried it with a Hackathon Portal account. → If you find a good trend, I will apply it to my Twitter account.
In order to automate the process and operate it, we searched for a method that can be operated realistically according to various conditions and tried to operate it. After that, I will describe the conditions required for automation and the policy of the processing performed.
Define what you need to do to get more followers on Twitter. As a hypothesis, it is thought that Twitter followers will increase if the following contents are satisfied.
Following the hypothesis, we will identify the conditions necessary to realize automation.
First, The story of making an automatic follower acquisition tool on Twitter In the article
③ Follow all users who are your followers and have a large number of followers who are like the latest tweets.
This method cannot be practiced by normal means, as the current Twitter API does not provide information on all users who are like tweets
.
We've put together an implementation that doesn't do things that the current Twitter API can't do. Also, follow and like will return an error before reaching the limit described in Twitter's API, so it is necessary to stop today's processing at just the right place to prevent repeated errors. was. (Because API Key and count are frozen if repeated errors are issued) Therefore, I created the process so that it will settle down to the right number of times without causing an error.
0.25
for each tweet tweeted within a week for a particular keyword0.9
0.25
I will list the restrictions of Twitter and the restrictions of Twitter API that I got caught this time below. I tried to increase Twitter followers so as not to get caught in this regulation
What I learned from the operation is as follows
Due to the limitations of the Twitter API, it was not possible to make it (as a web service) so that it could be shared by others. In order to practice the same method as introduced here, you must obtain the API Key of the Twitter API. Also, as of 2020, a review is required to obtain the API Key of the Twitter API individually. Please refer to the following to pass the examination and obtain the API Key. Detailed explanation from the example sentence of the 2020 version Twitter API usage application to the acquisition of the API key