mispy-archive / twitter_ebooks

Better twitterbots for all your friends~
MIT License
972 stars 140 forks source link

can't get 'ebooks archive' to authenticate #49

Closed tape- closed 9 years ago

tape- commented 9 years ago

I was having this problem with an older 2.x version as well. I thought it might have been a ruby 1.9 problem so I upgraded to ruby 2.0, but the problem still persists:

(21:42:56) tape@charles:~/twitter_ebooks/tape> ebooks archive tape New archive for @tape at corpus/tape.json /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/response/raise_error.rb:15:in on_complete': Could not authenticate you (Twitter::Error::Unauthorized) from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:9:inblock in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:57:in on_complete' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/response.rb:8:incall' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/url_encoded.rb:15:in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/request/multipart.rb:14:incall' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/request/multipart_with_file.rb:17:in call' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/rack_builder.rb:139:inbuild_response' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:377:in run_request' from /var/lib/gems/2.0.0/gems/faraday-0.9.0/lib/faraday/connection.rb:140:inget' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/request.rb:33:in perform' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:51:inperform_request' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:96:in perform_request_with_objects' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/utils.rb:140:inobjects_from_response_with_user' from /var/lib/gems/2.0.0/gems/twitter-5.13.0/lib/twitter/rest/timelines.rb:49:in user_timeline' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:77:inblock in sync' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:74:in loop' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/lib/twitter_ebooks/archive.rb:74:insync' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:152:in archive' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:324:incommand' from /var/lib/gems/2.0.0/gems/twitter_ebooks-3.0.4/bin/ebooks:341:in <top (required)>' from /usr/local/bin/ebooks:23:inload' from /usr/local/bin/ebooks:23:in `

'

currently have twitter_ebooks 3.0.4.

stringbot commented 9 years ago

@tape- this looks like an auth problem; double check that your consumer and access credentials are all up to snuff.

tape- commented 9 years ago

I've checked numerous times. the bot has no trouble connecting when it's running normally; it's only the archive function that won't connect.

tape- commented 9 years ago

I'm curious about this from the readme:

twitter_ebooks comes with a syncing tool to download and then incrementally update a local json archive of a user's tweets.

➜ ebooks archive 0xabad1dea corpus/0xabad1dea.json Currently 20209 tweets for 0xabad1dea Received 67 new tweets

The first time you'll run this, it'll ask for auth details to connect with.

I don't remember this happening.

stawberri commented 9 years ago

Do you have an ~\.ebooksrc file? If you do, that part you bolded did happen a realllllly long time ago, and you probably already de-authed the app that you used to authenticate. ^^;

tape- commented 9 years ago

well, that's weird. I had an .ebooksrc that had the correct keys/tokens in it. I deleted it and re-ran 'ebooks archive' and everything is fine.

(well, actually, it's not, but the auth problem is fixed at least. thanks!)

Samuelfaure commented 8 years ago

Hello,

I have the same issue but can't seem to find the ~.ebooksrc file. Where could it be ?

abhinavchh commented 8 years ago

@Zerhariel it's in Users/YOURNAME/.ebooksrc

AugustMiller commented 6 years ago

In case you've found your way here after creating a new Twitter account and can't figure out why the keys from the app's page don't work—make sure your email is confirmed, then re-generate the token and secret. Then, as mentioned, drop them into ~/.ebooksrc and your Heroku app's environment variables.