You can easily write a Twitter bot with the help of Google Apps Script. It fetches tweets addressed (@mentions) to the bot through the Twitter API, computes the answer with Wolfraph Alpha and replies with a tweet.
It is possible to send bulk tweets from Google Spreadsheet using Google Scripts. To get started, you need to include the OAuth1 libarary in your project, create a new Twitter app on apps.twitter.com and pass the Consumer Keys and API Secret to the Google Script project.
This Google Script converts the JSON response from the Twitter API to standard RSS feeds. The results are cached for 60 minutes and all requests to Twitter are authenticated with OAuth, an important requirement of the Twitter API v1.1.
Use the following PHP code to determine all the locations (cities and countries) for which Twitter can offer local trends data
The Twitter API offers the Trends availability data in JSON format that you can parse with the json_decode function of PHP.
About The Author
Amit Agarwal is a web geek and founder of Digital Inspiration, a popular tech & how-to website since 2004 ..read more