Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kylebragger opened this issue Dec 2, 2009 · 2 comments

Comments

@kylebragger
Copy link

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
Copy link
Author

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
Copy link

marnen commented Dec 29, 2009

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants