mbleigh / twitter-auth

Standard authentication stack for Rails using Twitter to log in.
355 stars 48 forks source link

Arguments for get() and post() are not being passed through to Twitter's API #22

Open kylebragger opened 14 years ago

kylebragger commented 14 years ago

Assuming twitter_user is an instance of User and authenticated via OAuth,

opts = {} opts['count'] = '200' opts['since_id'] = twitter_user.since_id unless twitter_user.since_id.blank? tweets = twitter_user.twitter.get('/statuses/friends_timeline', opts)

opts are not passed through, and tweets contains the last 20 tweets for this method, without regard for since_id

Looking through the dispatcher code, it would seem that this should be working, but I can't seem to reproduce.

kylebragger commented 14 years ago

This solves the issue (although I have been mucking with ruby-debug, Net::HTTP, etc. for an hour and can't figure out why [yet]):

twitter_user.twitter.get('/statuses/friends_timeline?count=200&since_id=12345')

marnen commented 14 years ago

I think this is because get isn't "supposed to" take separate arguments, or some such. Separate arguments work fine with post.