SlideShare a Scribd company logo
Twitter bots can do interesting things.
You ask a question to @DearAssistant (like how many calories in Diet Coke) and it
will tweet the answer much like Siri or Google Now. Tweet your location to
@WhatTheFare and it will let you know the Uber fare to your destination. The
@HundredZeros bot tweets links to eBooks that are free on Amazon. The
@Big_Ben_Clock bongs every hour. The @GrammarNazi bot finds tweets with
misspelled words and responds with the correct spelling. The list is endless.
Twitter Rules around Automation
In the following tutorial, we will learn how to quickly create Twitter bots that can:
1. Retweet tweets
2. Favorite tweets
3. Reply to tweets
4. RT tweets but after adding their own comment
Creating these Twitter bots is easy but before you get started, please make sure that you
have read the Twitter Rules around automation. It says that you may not use the Twitter
service for the purpose of spamming anyone. Some of the factors that are taken into account
when determining what conduct is considered to be spamming are:
• If your updates consist mainly of links, and not personal updates;
• If you send large numbers of duplicate @replies or mentions;
• If you send large numbers of unsolicited @replies or mentions;
• Randomly or aggressively following, favoriting or Retweeting Tweets;
The rules also say:
You may not develop any application that allows for favoriting of Tweets in a bulk or
automated manner. Aggressive favoriting is a violation of the Twitter Rules. Automation
of Retweets often leads to spam and other negative user experiences; therefore,
Retweeting in a bulk or automated manner is prohibited. Automated Retweeting is
permitted for apps or accounts that Twitter deems to provide a community benefit.
How to Create Twitter Bots
Page 1Digital Inspiration www.ctrlq.org
Step 1: Create a new Twitter App
It is recommended that you create a new Twitter account for the bot and not use your
main account. Once you have created an account, associate your mobile phone with the
Twitter account (Go to Settings - Mobile and verify your phone number). This is required
because Twitter would only allow accounts that have a mobile phone associated with them to
build apps and bots.
Go to https://apps.twitter.com/app/new and create a new Twitter bot. Enter the application
name (say My First Twitter Bot), add a description, and put any URL in the website field - like
http://ctrlq.org/. Accept the terms and click the "Create" button to build your first Twitter bot
app. You can leave the Callback URL field blank.
How to Create Twitter Bots
Page 2Digital Inspiration www.ctrlq.org
Step 2: Generate the Twitter Keys
On the next page, click the Keys and Access Tokens tab and then click the Create my
Access Token button to generate the Consumer Keys and Access Tokens for your Twitter
bot. We'll need them in the later step.
How to Create Twitter Bots
Page 3Digital Inspiration www.ctrlq.org
Step 3: Note the Keys and Tokens
Twitter will now generate the keys and secret tokens for your Twitter Bot, make a note of
these values and do not ever share them with anyone.
How to Create Twitter Bots
Page 4Digital Inspiration www.ctrlq.org
Step 4: Copy the Twitter Bot
Now that our Twitter App is ready, it is time to create the Twitter Bot using Google Scripts.
Click the link to the Google Sheet that you received in your email to copy the sheet in your
own Google Drive.
How to Create Twitter Bots
Page 5Digital Inspiration www.ctrlq.org
Step 5: Configure the Bot
In the Google sheet, go to the Twitter Bots menu and choose Configure.
How to Create Twitter Bots
Page 6Digital Inspiration www.ctrlq.org
Step 6: Authorize the Bot
If you are running the Google Sheet for the first time, you may have to authorize the sheet to
connect with Twitter. Click "Continue" when the Authorization Required dialog pops-up and
then click Allow at the permissions prompt.
This Twitter bot runs in your own Google Account and connect directly to Twitter via Twitter
API and Google APIs. It does not share any of your data with any service.
How to Create Twitter Bots
Page 7Digital Inspiration www.ctrlq.org
Step 7: Write the Bot Rules
The bot is almost ready now. Enter the Twitter Keys that you created in Step #3 in the
corresponding inbox boxes.
Next, we'll write rules for our Twitter bot. For instance, we may have a rule that searches for
the word "acommodate" and replies with the text "I think the correct spelling is
accommodate". Another rule could favorite tweets sent by @BarackObama containing the
word India. In this case, the search phrase would be from:BarackObama India and so on.
How to Create Twitter Bots
Page 8Digital Inspiration www.ctrlq.org
Step 8: Start the Twitter Bot
Once you've written all the rules, click the Save button to run your Twitter bots. The bot will
send a test tweet to @labnol to test your Twitter keys and if the connection is successful, the
bots will go live.
They will run in the background every 10-15 minutes on Google Servers and you can close
the Google Sheet as well. All the bot activity will be logged in the Google Sheet so you know
what's happening behind the scenes.
Here's a sample tweet sent by our Twitter bot (Rule #2)
How to Create Twitter Bots
Page 9Digital Inspiration www.ctrlq.org
Twitter Bot - FAQ
1. How many bots can I create?
You can create up to 5 rules per sheet and each rule is equivalent to a separate bot. If you
need more bots, create another copy of the Google sheet and repeat all the steps.
2. How do I stop the Twitter bot?
Go to the Google sheet, choose the Twitter Bots menu and select Stop to deactivate the bot.
3. My Twitter bot is not working. I am getting an error that Twitter is unable to perform
write operations.
It is likely that your Twitter app has been suspended for retweeting / favoriting too quickly.
Remove the RT/favoriting rules and create a new Twitter app.
4. Why is the Twitter bot requiring access to my docs and email?
The Twitter bot uses the Twitter library and this is configured to email the user in the event of
a failure. Similarly the same bot can be used to write to Google Docs as well instead of
sheets. Hence it is requiring access to these Google Services.
5. I think someone else is using my Twitter keys. What should I do?
Go to apps.twitter.com, open your Twitter bot app and regenerate the keys. This will render
the other keys useless.
6. Is my data 100% safe?
The Twitter bot uses Google Apps Script to directly connect to the Twitter API and no other
third-party has access to even a bit of your data.
How to Create Twitter Bots
Page 10Digital Inspiration www.ctrlq.org
Next Steps
You can get the Twitter Bot app from Digital Inspiration. We've created more useful Twitter
apps include:
• Twitter Bot - Setup your own Twitter bots that can @reply to tweets, retweet and
favorite tweets.
• Tweet Archiver - Save tweets for any #hashtag in a Google Sheet.
• Personalized Tweets - Send tweets and DMs in bulk from a Google Sheet.
All the Twitter bots are written using Google Scripts. For support and customization, contact
Amit Agarwal at amit@labnol.org or tweet @labnol.
How to Create Twitter Bots
Page 11Digital Inspiration www.ctrlq.org

More Related Content

What's hot

KNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREE
KNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREEKNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREE
KNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREE
kamruzjahussain
 
Judging Websites
Judging WebsitesJudging Websites
Judging Websites
guest96755
 
What is Instagram
What is  InstagramWhat is  Instagram
What is Instagram
Afghanistan
 
Facebook part 3
Facebook part 3Facebook part 3
Facebook part 3
Tara Cicora
 
Twitter For Job Seekers
Twitter For Job SeekersTwitter For Job Seekers
Twitter For Job Seekers
Cleo Parker
 
Designing for the Social Web: Integrating Social Media into Web Design
Designing for the Social Web: Integrating Social Media into Web DesignDesigning for the Social Web: Integrating Social Media into Web Design
Designing for the Social Web: Integrating Social Media into Web Design
Eric T. Tung
 
Twitter For Job Search Mar 2011
Twitter For Job Search Mar 2011Twitter For Job Search Mar 2011
Twitter For Job Search Mar 2011
Sandra Clark
 
Social Media Marketing: Twitter
Social Media Marketing: TwitterSocial Media Marketing: Twitter
Social Media Marketing: Twitter
Laurynas Binderis
 
How to start using Twitter
How to start using TwitterHow to start using Twitter
How to start using Twitter
Albert Einstein Cancer Center
 
Tweetcamp: Twitter 150
Tweetcamp: Twitter 150Tweetcamp: Twitter 150
Tweetcamp: Twitter 150
Lee Aase
 
Twitter How To Set Up An Account
Twitter How To Set Up An AccountTwitter How To Set Up An Account
Twitter How To Set Up An Account
Brad Sage
 
Market Yourself Using Twitter
Market Yourself Using TwitterMarket Yourself Using Twitter
Market Yourself Using Twitter
Saundra Washington
 
Designing for Social Media
Designing for Social MediaDesigning for Social Media
Designing for Social Media
Eric T. Tung
 
Get the Most Out of Twitter at a Convention
Get the Most Out of  Twitter at a ConventionGet the Most Out of  Twitter at a Convention
Get the Most Out of Twitter at a Convention
Mary K.D. D'Rozario
 
Social media presence
Social media presenceSocial media presence
Social media presence
bjsrwelch
 
Getting Started on Social Media
Getting Started on Social MediaGetting Started on Social Media
Getting Started on Social Media
ed2go
 

What's hot (18)

KNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREE
KNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREEKNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREE
KNOW TEPS TO EARN REVENUE FROM TIWEETR DOUNLOAD THIS E BOOK FOR FREE
 
Judging Websites
Judging WebsitesJudging Websites
Judging Websites
 
What is Instagram
What is  InstagramWhat is  Instagram
What is Instagram
 
Facebook part 3
Facebook part 3Facebook part 3
Facebook part 3
 
Twitter For Job Seekers
Twitter For Job SeekersTwitter For Job Seekers
Twitter For Job Seekers
 
Designing for the Social Web: Integrating Social Media into Web Design
Designing for the Social Web: Integrating Social Media into Web DesignDesigning for the Social Web: Integrating Social Media into Web Design
Designing for the Social Web: Integrating Social Media into Web Design
 
Twitter For Job Search Mar 2011
Twitter For Job Search Mar 2011Twitter For Job Search Mar 2011
Twitter For Job Search Mar 2011
 
Social Media Marketing: Twitter
Social Media Marketing: TwitterSocial Media Marketing: Twitter
Social Media Marketing: Twitter
 
How to start using Twitter
How to start using TwitterHow to start using Twitter
How to start using Twitter
 
Tweetcamp: Twitter 150
Tweetcamp: Twitter 150Tweetcamp: Twitter 150
Tweetcamp: Twitter 150
 
Twitter How To Set Up An Account
Twitter How To Set Up An AccountTwitter How To Set Up An Account
Twitter How To Set Up An Account
 
Market Yourself Using Twitter
Market Yourself Using TwitterMarket Yourself Using Twitter
Market Yourself Using Twitter
 
Ci350 tutorial
Ci350 tutorialCi350 tutorial
Ci350 tutorial
 
Twitter tools webinar
Twitter tools webinarTwitter tools webinar
Twitter tools webinar
 
Designing for Social Media
Designing for Social MediaDesigning for Social Media
Designing for Social Media
 
Get the Most Out of Twitter at a Convention
Get the Most Out of  Twitter at a ConventionGet the Most Out of  Twitter at a Convention
Get the Most Out of Twitter at a Convention
 
Social media presence
Social media presenceSocial media presence
Social media presence
 
Getting Started on Social Media
Getting Started on Social MediaGetting Started on Social Media
Getting Started on Social Media
 

Similar to How to Create Twitter Bots

Twitter for Business
Twitter for BusinessTwitter for Business
Twitter for Business
Carla Yashiro
 
Blogging tweeting - Getting started with blogger and twitter
Blogging tweeting - Getting started with blogger and twitterBlogging tweeting - Getting started with blogger and twitter
Blogging tweeting - Getting started with blogger and twitter
robin fay
 
Twitter and word_press
Twitter and word_pressTwitter and word_press
Twitter and word_press
Flora Runyenje
 
Bot
BotBot
Free Guide to Getting More ReTweets
Free Guide to Getting More ReTweetsFree Guide to Getting More ReTweets
Free Guide to Getting More ReTweets
Kyle Clouthier
 
9324 mgd1059.zipfirst ebook
9324 mgd1059.zipfirst ebook9324 mgd1059.zipfirst ebook
9324 mgd1059.zipfirst ebookcynthiab49
 
Twitter101forjobsearchersrjm 124517690932 Phpapp02
Twitter101forjobsearchersrjm 124517690932 Phpapp02Twitter101forjobsearchersrjm 124517690932 Phpapp02
Twitter101forjobsearchersrjm 124517690932 Phpapp02
pamjlloyd
 
Twitter fast start rebranded
Twitter fast start rebrandedTwitter fast start rebranded
Twitter fast start rebranded
cynthiab49
 
Twitter Marketing Made Easy
Twitter Marketing Made EasyTwitter Marketing Made Easy
Twitter Marketing Made Easy
The_Forgiven Galo
 
Twitter101
Twitter101Twitter101
Twitter101
lauren shannon
 
Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!
Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!
Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!
Matthew Woodward
 
Getting Started With Twitter
Getting Started With TwitterGetting Started With Twitter
Getting Started With Twitter
Robert Crane
 
Tweet tweet
Tweet tweetTweet tweet
Tweet tweet
MaryamLootah
 
GO TO GATZ: Twitter Dictionary
GO TO GATZ: Twitter Dictionary GO TO GATZ: Twitter Dictionary
GO TO GATZ: Twitter Dictionary
Gatz Optimize LLC
 
How to Use Social Media Automation to Improve Your Marketing
How to Use Social Media Automation to Improve Your MarketingHow to Use Social Media Automation to Improve Your Marketing
How to Use Social Media Automation to Improve Your Marketing
Post Planner
 
Twitter for the_tweeple
Twitter for the_tweepleTwitter for the_tweeple
Twitter for the_tweeple
Flora Runyenje
 
Twitter fast start rebranded
Twitter fast start rebrandedTwitter fast start rebranded
Twitter fast start rebranded
Karl May
 
How to Find Your Most Liked Tweets?
How to Find Your Most Liked Tweets?How to Find Your Most Liked Tweets?
How to Find Your Most Liked Tweets?
Slots Online Casino USA
 
Pam Perrys Twitter fast-start Bonus
Pam Perrys Twitter fast-start BonusPam Perrys Twitter fast-start Bonus
Pam Perrys Twitter fast-start Bonus
Pam Perry
 

Similar to How to Create Twitter Bots (20)

Twitter for Business
Twitter for BusinessTwitter for Business
Twitter for Business
 
Blogging tweeting - Getting started with blogger and twitter
Blogging tweeting - Getting started with blogger and twitterBlogging tweeting - Getting started with blogger and twitter
Blogging tweeting - Getting started with blogger and twitter
 
Twitter and word_press
Twitter and word_pressTwitter and word_press
Twitter and word_press
 
Bot
BotBot
Bot
 
Free Guide to Getting More ReTweets
Free Guide to Getting More ReTweetsFree Guide to Getting More ReTweets
Free Guide to Getting More ReTweets
 
9324 mgd1059.zipfirst ebook
9324 mgd1059.zipfirst ebook9324 mgd1059.zipfirst ebook
9324 mgd1059.zipfirst ebook
 
Twitter101forjobsearchersrjm 124517690932 Phpapp02
Twitter101forjobsearchersrjm 124517690932 Phpapp02Twitter101forjobsearchersrjm 124517690932 Phpapp02
Twitter101forjobsearchersrjm 124517690932 Phpapp02
 
Twitter Fast Start
Twitter Fast StartTwitter Fast Start
Twitter Fast Start
 
Twitter fast start rebranded
Twitter fast start rebrandedTwitter fast start rebranded
Twitter fast start rebranded
 
Twitter Marketing Made Easy
Twitter Marketing Made EasyTwitter Marketing Made Easy
Twitter Marketing Made Easy
 
Twitter101
Twitter101Twitter101
Twitter101
 
Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!
Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!
Learn How To Drive Tonnes Of Traffic From Twitter On Autopilot!
 
Getting Started With Twitter
Getting Started With TwitterGetting Started With Twitter
Getting Started With Twitter
 
Tweet tweet
Tweet tweetTweet tweet
Tweet tweet
 
GO TO GATZ: Twitter Dictionary
GO TO GATZ: Twitter Dictionary GO TO GATZ: Twitter Dictionary
GO TO GATZ: Twitter Dictionary
 
How to Use Social Media Automation to Improve Your Marketing
How to Use Social Media Automation to Improve Your MarketingHow to Use Social Media Automation to Improve Your Marketing
How to Use Social Media Automation to Improve Your Marketing
 
Twitter for the_tweeple
Twitter for the_tweepleTwitter for the_tweeple
Twitter for the_tweeple
 
Twitter fast start rebranded
Twitter fast start rebrandedTwitter fast start rebranded
Twitter fast start rebranded
 
How to Find Your Most Liked Tweets?
How to Find Your Most Liked Tweets?How to Find Your Most Liked Tweets?
How to Find Your Most Liked Tweets?
 
Pam Perrys Twitter fast-start Bonus
Pam Perrys Twitter fast-start BonusPam Perrys Twitter fast-start Bonus
Pam Perrys Twitter fast-start Bonus
 

More from Amit Agarwal

Amit agarwal - Twitter Profile
Amit agarwal - Twitter ProfileAmit agarwal - Twitter Profile
Amit agarwal - Twitter Profile
Amit Agarwal
 
Google Addons and Google Apps Script Developer
Google Addons and Google Apps Script DeveloperGoogle Addons and Google Apps Script Developer
Google Addons and Google Apps Script Developer
Amit Agarwal
 
Tech Tips
Tech TipsTech Tips
Tech Tips
Amit Agarwal
 
Who Can See your Google Drive Files
Who Can See your Google Drive FilesWho Can See your Google Drive Files
Who Can See your Google Drive Files
Amit Agarwal
 
Gmail Send Later
Gmail Send LaterGmail Send Later
Gmail Send Later
Amit Agarwal
 
Gmail Auto-Forward with Google Scripts
Gmail Auto-Forward with Google ScriptsGmail Auto-Forward with Google Scripts
Gmail Auto-Forward with Google Scripts
Amit Agarwal
 
Gmail Mail Merge with Personalized Attachments and Email Tracking
Gmail Mail Merge with Personalized Attachments and Email TrackingGmail Mail Merge with Personalized Attachments and Email Tracking
Gmail Mail Merge with Personalized Attachments and Email Tracking
Amit Agarwal
 
Export Gmail Attachments to Google Drive
Export Gmail Attachments to Google DriveExport Gmail Attachments to Google Drive
Export Gmail Attachments to Google Drive
Amit Agarwal
 
Inline images for mail merge
Inline images for mail mergeInline images for mail merge
Inline images for mail merge
Amit Agarwal
 
Hello world
Hello worldHello world
Hello world
Amit Agarwal
 
Social Sharing
Social Sharing Social Sharing
Social Sharing
Amit Agarwal
 
Twitter Book
Twitter BookTwitter Book
Twitter Book
Amit Agarwal
 
Test Presentation - Ignore
Test Presentation - IgnoreTest Presentation - Ignore
Test Presentation - Ignore
Amit Agarwal
 
AdSense Tips by Amit Agarwal
AdSense Tips by Amit AgarwalAdSense Tips by Amit Agarwal
AdSense Tips by Amit Agarwal
Amit Agarwal
 
Google Adsense Errors
Google Adsense ErrorsGoogle Adsense Errors
Google Adsense Errors
Amit Agarwal
 
Write A Successful Blog
Write A Successful BlogWrite A Successful Blog
Write A Successful Blog
Amit Agarwal
 

More from Amit Agarwal (19)

Amit agarwal - Twitter Profile
Amit agarwal - Twitter ProfileAmit agarwal - Twitter Profile
Amit agarwal - Twitter Profile
 
Google Addons and Google Apps Script Developer
Google Addons and Google Apps Script DeveloperGoogle Addons and Google Apps Script Developer
Google Addons and Google Apps Script Developer
 
Tech Tips
Tech TipsTech Tips
Tech Tips
 
Who Can See your Google Drive Files
Who Can See your Google Drive FilesWho Can See your Google Drive Files
Who Can See your Google Drive Files
 
Gmail Send Later
Gmail Send LaterGmail Send Later
Gmail Send Later
 
Blogging Tips
Blogging TipsBlogging Tips
Blogging Tips
 
Gmail Auto-Forward with Google Scripts
Gmail Auto-Forward with Google ScriptsGmail Auto-Forward with Google Scripts
Gmail Auto-Forward with Google Scripts
 
Gmail Mail Merge with Personalized Attachments and Email Tracking
Gmail Mail Merge with Personalized Attachments and Email TrackingGmail Mail Merge with Personalized Attachments and Email Tracking
Gmail Mail Merge with Personalized Attachments and Email Tracking
 
Export Gmail Attachments to Google Drive
Export Gmail Attachments to Google DriveExport Gmail Attachments to Google Drive
Export Gmail Attachments to Google Drive
 
Inline images for mail merge
Inline images for mail mergeInline images for mail merge
Inline images for mail merge
 
Hello world
Hello worldHello world
Hello world
 
Social Sharing
Social Sharing Social Sharing
Social Sharing
 
Twitter Book
Twitter BookTwitter Book
Twitter Book
 
Test Presentation - Ignore
Test Presentation - IgnoreTest Presentation - Ignore
Test Presentation - Ignore
 
Twitter Spam
Twitter SpamTwitter Spam
Twitter Spam
 
Presentation1
Presentation1Presentation1
Presentation1
 
AdSense Tips by Amit Agarwal
AdSense Tips by Amit AgarwalAdSense Tips by Amit Agarwal
AdSense Tips by Amit Agarwal
 
Google Adsense Errors
Google Adsense ErrorsGoogle Adsense Errors
Google Adsense Errors
 
Write A Successful Blog
Write A Successful BlogWrite A Successful Blog
Write A Successful Blog
 

Recently uploaded

Your Path to YouTube Stardom Starts Here
Your Path to YouTube Stardom Starts HereYour Path to YouTube Stardom Starts Here
Your Path to YouTube Stardom Starts Here
SocioCosmos
 
HOW TO USE THREADS an Instagram App_ by Clarissa Credito
HOW TO USE THREADS an Instagram App_ by Clarissa CreditoHOW TO USE THREADS an Instagram App_ by Clarissa Credito
HOW TO USE THREADS an Instagram App_ by Clarissa Credito
ClarissaAlanoCredito
 
Social Media Marketing Strategies .
Social Media Marketing Strategies                     .Social Media Marketing Strategies                     .
Social Media Marketing Strategies .
Virtual Real Design
 
SluggerPunk Angel Investor Final Proposal
SluggerPunk Angel Investor Final ProposalSluggerPunk Angel Investor Final Proposal
SluggerPunk Angel Investor Final Proposal
grogshiregames
 
Grow Your Reddit Community Fast.........
Grow Your Reddit Community Fast.........Grow Your Reddit Community Fast.........
Grow Your Reddit Community Fast.........
SocioCosmos
 
Unlock TikTok Success with Sociocosmos..
Unlock TikTok Success with Sociocosmos..Unlock TikTok Success with Sociocosmos..
Unlock TikTok Success with Sociocosmos..
SocioCosmos
 
The Evolution of SEO: Insights from a Leading Digital Marketing Agency
The Evolution of SEO: Insights from a Leading Digital Marketing AgencyThe Evolution of SEO: Insights from a Leading Digital Marketing Agency
The Evolution of SEO: Insights from a Leading Digital Marketing Agency
Digital Marketing Lab
 
Buy Pinterest Followers, Reactions & Repins Go Viral on Pinterest with Socio...
Buy Pinterest Followers, Reactions & Repins  Go Viral on Pinterest with Socio...Buy Pinterest Followers, Reactions & Repins  Go Viral on Pinterest with Socio...
Buy Pinterest Followers, Reactions & Repins Go Viral on Pinterest with Socio...
SocioCosmos
 
Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......
SocioCosmos
 
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
ryxqoswi
 
Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...
Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...
Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...
AJHSSR Journal
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAMLORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
lorraineandreiamcidl
 
HOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa CreditoHOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa Credito
ClarissaAlanoCredito
 
Surat Digital Marketing School - course curriculum
Surat Digital Marketing School - course curriculumSurat Digital Marketing School - course curriculum
Surat Digital Marketing School - course curriculum
digitalcourseshop4
 
Project Serenity — 33% Life-time Commissions.docx
Project Serenity — 33% Life-time Commissions.docxProject Serenity — 33% Life-time Commissions.docx
Project Serenity — 33% Life-time Commissions.docx
zeqirielmedina8
 
Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...
Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...
Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...
AJHSSR Journal
 
Transform Your Presence Now!..............
Transform Your Presence Now!..............Transform Your Presence Now!..............
Transform Your Presence Now!..............
SocioCosmos
 
SluggerPunk Final Angel Investor Proposal
SluggerPunk Final Angel Investor ProposalSluggerPunk Final Angel Investor Proposal
SluggerPunk Final Angel Investor Proposal
grogshiregames
 
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
Febless Hernane
 

Recently uploaded (19)

Your Path to YouTube Stardom Starts Here
Your Path to YouTube Stardom Starts HereYour Path to YouTube Stardom Starts Here
Your Path to YouTube Stardom Starts Here
 
HOW TO USE THREADS an Instagram App_ by Clarissa Credito
HOW TO USE THREADS an Instagram App_ by Clarissa CreditoHOW TO USE THREADS an Instagram App_ by Clarissa Credito
HOW TO USE THREADS an Instagram App_ by Clarissa Credito
 
Social Media Marketing Strategies .
Social Media Marketing Strategies                     .Social Media Marketing Strategies                     .
Social Media Marketing Strategies .
 
SluggerPunk Angel Investor Final Proposal
SluggerPunk Angel Investor Final ProposalSluggerPunk Angel Investor Final Proposal
SluggerPunk Angel Investor Final Proposal
 
Grow Your Reddit Community Fast.........
Grow Your Reddit Community Fast.........Grow Your Reddit Community Fast.........
Grow Your Reddit Community Fast.........
 
Unlock TikTok Success with Sociocosmos..
Unlock TikTok Success with Sociocosmos..Unlock TikTok Success with Sociocosmos..
Unlock TikTok Success with Sociocosmos..
 
The Evolution of SEO: Insights from a Leading Digital Marketing Agency
The Evolution of SEO: Insights from a Leading Digital Marketing AgencyThe Evolution of SEO: Insights from a Leading Digital Marketing Agency
The Evolution of SEO: Insights from a Leading Digital Marketing Agency
 
Buy Pinterest Followers, Reactions & Repins Go Viral on Pinterest with Socio...
Buy Pinterest Followers, Reactions & Repins  Go Viral on Pinterest with Socio...Buy Pinterest Followers, Reactions & Repins  Go Viral on Pinterest with Socio...
Buy Pinterest Followers, Reactions & Repins Go Viral on Pinterest with Socio...
 
Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......Your LinkedIn Success Starts Here.......
Your LinkedIn Success Starts Here.......
 
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
快速办理(BCR毕业证书)加州大学河滨分校毕业证文凭证书一模一样
 
Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...
Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...
Exploring The Dimensions and Dynamics of Felt Obligation: A Bibliometric Anal...
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAMLORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE TELEGRAM
 
HOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa CreditoHOW TO USE FACEBOOK _ by Clarissa Credito
HOW TO USE FACEBOOK _ by Clarissa Credito
 
Surat Digital Marketing School - course curriculum
Surat Digital Marketing School - course curriculumSurat Digital Marketing School - course curriculum
Surat Digital Marketing School - course curriculum
 
Project Serenity — 33% Life-time Commissions.docx
Project Serenity — 33% Life-time Commissions.docxProject Serenity — 33% Life-time Commissions.docx
Project Serenity — 33% Life-time Commissions.docx
 
Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...
Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...
Improving Workplace Safety Performance in Malaysian SMEs: The Role of Safety ...
 
Transform Your Presence Now!..............
Transform Your Presence Now!..............Transform Your Presence Now!..............
Transform Your Presence Now!..............
 
SluggerPunk Final Angel Investor Proposal
SluggerPunk Final Angel Investor ProposalSluggerPunk Final Angel Investor Proposal
SluggerPunk Final Angel Investor Proposal
 
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANEEASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
EASY TUTORIAL OF HOW TO USE G-TEAMS BY: FEBLESS HERNANE
 

How to Create Twitter Bots

  • 1. Twitter bots can do interesting things. You ask a question to @DearAssistant (like how many calories in Diet Coke) and it will tweet the answer much like Siri or Google Now. Tweet your location to @WhatTheFare and it will let you know the Uber fare to your destination. The @HundredZeros bot tweets links to eBooks that are free on Amazon. The @Big_Ben_Clock bongs every hour. The @GrammarNazi bot finds tweets with misspelled words and responds with the correct spelling. The list is endless. Twitter Rules around Automation In the following tutorial, we will learn how to quickly create Twitter bots that can: 1. Retweet tweets 2. Favorite tweets 3. Reply to tweets 4. RT tweets but after adding their own comment Creating these Twitter bots is easy but before you get started, please make sure that you have read the Twitter Rules around automation. It says that you may not use the Twitter service for the purpose of spamming anyone. Some of the factors that are taken into account when determining what conduct is considered to be spamming are: • If your updates consist mainly of links, and not personal updates; • If you send large numbers of duplicate @replies or mentions; • If you send large numbers of unsolicited @replies or mentions; • Randomly or aggressively following, favoriting or Retweeting Tweets; The rules also say: You may not develop any application that allows for favoriting of Tweets in a bulk or automated manner. Aggressive favoriting is a violation of the Twitter Rules. Automation of Retweets often leads to spam and other negative user experiences; therefore, Retweeting in a bulk or automated manner is prohibited. Automated Retweeting is permitted for apps or accounts that Twitter deems to provide a community benefit. How to Create Twitter Bots Page 1Digital Inspiration www.ctrlq.org
  • 2. Step 1: Create a new Twitter App It is recommended that you create a new Twitter account for the bot and not use your main account. Once you have created an account, associate your mobile phone with the Twitter account (Go to Settings - Mobile and verify your phone number). This is required because Twitter would only allow accounts that have a mobile phone associated with them to build apps and bots. Go to https://apps.twitter.com/app/new and create a new Twitter bot. Enter the application name (say My First Twitter Bot), add a description, and put any URL in the website field - like http://ctrlq.org/. Accept the terms and click the "Create" button to build your first Twitter bot app. You can leave the Callback URL field blank. How to Create Twitter Bots Page 2Digital Inspiration www.ctrlq.org
  • 3. Step 2: Generate the Twitter Keys On the next page, click the Keys and Access Tokens tab and then click the Create my Access Token button to generate the Consumer Keys and Access Tokens for your Twitter bot. We'll need them in the later step. How to Create Twitter Bots Page 3Digital Inspiration www.ctrlq.org
  • 4. Step 3: Note the Keys and Tokens Twitter will now generate the keys and secret tokens for your Twitter Bot, make a note of these values and do not ever share them with anyone. How to Create Twitter Bots Page 4Digital Inspiration www.ctrlq.org
  • 5. Step 4: Copy the Twitter Bot Now that our Twitter App is ready, it is time to create the Twitter Bot using Google Scripts. Click the link to the Google Sheet that you received in your email to copy the sheet in your own Google Drive. How to Create Twitter Bots Page 5Digital Inspiration www.ctrlq.org
  • 6. Step 5: Configure the Bot In the Google sheet, go to the Twitter Bots menu and choose Configure. How to Create Twitter Bots Page 6Digital Inspiration www.ctrlq.org
  • 7. Step 6: Authorize the Bot If you are running the Google Sheet for the first time, you may have to authorize the sheet to connect with Twitter. Click "Continue" when the Authorization Required dialog pops-up and then click Allow at the permissions prompt. This Twitter bot runs in your own Google Account and connect directly to Twitter via Twitter API and Google APIs. It does not share any of your data with any service. How to Create Twitter Bots Page 7Digital Inspiration www.ctrlq.org
  • 8. Step 7: Write the Bot Rules The bot is almost ready now. Enter the Twitter Keys that you created in Step #3 in the corresponding inbox boxes. Next, we'll write rules for our Twitter bot. For instance, we may have a rule that searches for the word "acommodate" and replies with the text "I think the correct spelling is accommodate". Another rule could favorite tweets sent by @BarackObama containing the word India. In this case, the search phrase would be from:BarackObama India and so on. How to Create Twitter Bots Page 8Digital Inspiration www.ctrlq.org
  • 9. Step 8: Start the Twitter Bot Once you've written all the rules, click the Save button to run your Twitter bots. The bot will send a test tweet to @labnol to test your Twitter keys and if the connection is successful, the bots will go live. They will run in the background every 10-15 minutes on Google Servers and you can close the Google Sheet as well. All the bot activity will be logged in the Google Sheet so you know what's happening behind the scenes. Here's a sample tweet sent by our Twitter bot (Rule #2) How to Create Twitter Bots Page 9Digital Inspiration www.ctrlq.org
  • 10. Twitter Bot - FAQ 1. How many bots can I create? You can create up to 5 rules per sheet and each rule is equivalent to a separate bot. If you need more bots, create another copy of the Google sheet and repeat all the steps. 2. How do I stop the Twitter bot? Go to the Google sheet, choose the Twitter Bots menu and select Stop to deactivate the bot. 3. My Twitter bot is not working. I am getting an error that Twitter is unable to perform write operations. It is likely that your Twitter app has been suspended for retweeting / favoriting too quickly. Remove the RT/favoriting rules and create a new Twitter app. 4. Why is the Twitter bot requiring access to my docs and email? The Twitter bot uses the Twitter library and this is configured to email the user in the event of a failure. Similarly the same bot can be used to write to Google Docs as well instead of sheets. Hence it is requiring access to these Google Services. 5. I think someone else is using my Twitter keys. What should I do? Go to apps.twitter.com, open your Twitter bot app and regenerate the keys. This will render the other keys useless. 6. Is my data 100% safe? The Twitter bot uses Google Apps Script to directly connect to the Twitter API and no other third-party has access to even a bit of your data. How to Create Twitter Bots Page 10Digital Inspiration www.ctrlq.org
  • 11. Next Steps You can get the Twitter Bot app from Digital Inspiration. We've created more useful Twitter apps include: • Twitter Bot - Setup your own Twitter bots that can @reply to tweets, retweet and favorite tweets. • Tweet Archiver - Save tweets for any #hashtag in a Google Sheet. • Personalized Tweets - Send tweets and DMs in bulk from a Google Sheet. All the Twitter bots are written using Google Scripts. For support and customization, contact Amit Agarwal at amit@labnol.org or tweet @labnol. How to Create Twitter Bots Page 11Digital Inspiration www.ctrlq.org