Member-only story
This is useful if you are unable to tweet as you are living in a different timezone than your followers or for example you are planning a holiday.
In this article, I will explain how to set up scheduled tweets for a Rails Application.
Setup access to the Twitter Ads API
Unfortunately, the regular Twitter API does not have a function to schedule tweets. To use scheduled tweets, we need to use the Twitter Ads API
Follows the steps in this article to create an account that has access to the Twitter Ads API.
Setup on Rails on Rails
Now that we have access to the Twitter Ads API, we can start implementing our code to schedule tweets.
- Install Twitter Ads Gem into our Gemfile
gem 'twitter-ads'
After adding the gem to our Gemfile, run bundle install
2. Create a new rake file
lib/tasks/twitter_schedule_tweet.rake