Take the 2-minute tour ×

I am trying to build an application to help our marketing team manage a twitter competition. I had been using the Twitter search API, and I had assumed that it was working but it turns out that I am missing some tweets, due to limitations in the Twitter Search.

I have now switched over to trying to use OAuth to get into the API and pull our twitter users tweets so that we don't miss any.

I need to save the tweets into the database, thus wanting to run it on a cron. I can't click and 'Auth with Twitter' link every time the cron runs. So how do I solve this problem? I only require read access to our own account. I'm not really creating an application as such, just need to read all the competition tweets from our account.

I have been using TwitterOAuth class, from the twitter docs, but am having immense trouble getting around the preconceived idea that I'm building an app to post to twitter which people need to auth when this use case doesn't fit what I need.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

When your application authenticates a user account using OAuth, it should get back an access token, containing a token and token secret. Have your application save these details; they won't change. Then for future requests to the API, send along these details in your requests and you shouldn't need to re-auth on the Twitter site.

Alternatively, you might see about asking the Twitter team if your application can use xAuth, saving you from having to even need to "click to authenticate" on the Twitter site, though this is generally reserved for desktop applications; not too sure if it would be appropriate for your app.

share|improve this answer
Thanks I'll give that a try :) –  DavidYell Aug 24 '10 at 8:19

Your Answer


