Meet @DearAssistant, a Twitter bot that is like a mini version of Siri. You can tweet your questions in plan English and the bot will reply with an answer.
The Twitter bot is internally using Wolfram Alpha so there’s a whole range of questions that it can answer. Here are some questions that people have asked @DearAssistant so far:
- How many calories are in Diet Coke? (link)
- When was Mahatama Gandhi born? (link)
- What is the distance between city A and city B (link)
- Who directed the film M (link)
- What is the price of Kindle Paperwhite (link)
You can also ask the bot for word meanings, weather conditions, language translation, to convert between time zones, date calculations (how many days until Christmas) and more.
Writing a Twitter Bot – The Basic Ingredients
A bot is essentially a program that is always running in the background and whenever it encounters a command (tweets in this), it processes it (based on the text of the tweeet) and sends a reply to the tweeter in another tweet.
Earlier, you would need a web server to run the bot while the bot itself would be written in languages like PHP, Perl or Python. That’s complicated so we will use Google Scripts to write the Twitter bot and host it on our Google Drive.
How to Write a Twitter Bot – Step by Step
Full article? H e r e 🙂