0

I need to access the Twitter API user timeline service using the following REST request so I can pull some tweets from a feed to display on a site: "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=frosario"

It works mostly, but I'm getting sporadic 401 and 500 errors when performing this request; which seem to be because I'm hitting the rate limit for unauthenticated API calls.

I'd like to authenticate with my client Id and secret so I can take advantage of the increased rate limit. I'd like to do this with a server side OAuth flow just using my client id and secret; but could also provide user credentials if needed. However, this needs to be all server side; I can't go through the OAuth redirect flow to authenticate with Twitter's API everytime we load up the site; just to download these tweets. What are my options? I looked over Twitter's OAuth documentation and didn't see anything that would seem to work for my situation; but perhaps I missed something.

Any constructive input is greatly appreciated.

Frank Rosario
  • 2,512
  • 5
  • 31
  • 47
  • Old question but please see my solution here: http://stackoverflow.com/questions/17067996/authenticate-and-request-a-users-timeline-with-twitter-api-1-1-oauth/ – hutchonoid Jun 14 '13 at 12:43

2 Answers2

0

When using oAuth you're using it to authenticate the current user so that you can access their specific tweets and such, which isn't what you're looking to do. You're just looking for a way to download certain tweets right?

You can create a console app or process to download the tweets for you, store them in a database, then read from your database.

If there is a lot of tweets, I'd recommend using the Twitter Stream API.

Jack Marchetti
  • 15,536
  • 14
  • 81
  • 117
0

You just need to authorize your application once. Check out the MVC quickstart in the Spring Social Twitter extension: http://www.springframework.net/social-twitter/

bbaia
  • 1,193
  • 7
  • 8