Fetching favorited tweets to display on a website


Hi, we’re considering developing a feature for a local utility company’s website, that would integrate with the Twitter API.

The basic idea is that when there is an emergency at the utility company, the field personnel would open the twitter app, post a message on the utility’s official Twitter account, and favorite it.

Whenever a user visits the website, the website would use the Twitter API to see if there are any favorited tweets on the official account. If so, it would display them as alerts.

My concerns are:

  1. Would we run into problems with rate limiting? During emergencies, thousands of visitors visit the site per hour.
  2. It looks like “application only authentication” is the most appropriate way to implement this. However I don’t see a simple way to (a) get application keys via the web interface, and (b) use them until the end of time. Am I looking in the wrong place?
  3. Since we’d be using a secret application key to get the favorited tweets, we’d need to put this behind a proxy service, which would then be accessed via ajax, which adds an additional layer of complexity.

Is this a terrible idea, or is it awesome?

Thanks if you can offer any insight!


Maybe the simplest thing would be to create a dedicated “@UtilityEmergency” account that people have access to, that would only tweet during emergencies, and use a Timeline Widget:

This doesn’t need the API, and there shouldn’t be any problems with lots of visitors. (You could even Retweet @UtilityEmergency tweets from @UtilityMain with something like IFTTT, so you don’t need the API for that either)

You won’t need to worry about tokens if you just use an embeded timeline (all it needs is javascript & some html).

But in case you end up using the API server side: tokens are on https://apps.twitter.com - Once you create an app - there’s a tab for Keys & access tokens where you can generate them.