KrauseFx / twitter-unfollow

Unfollow everybody on Twitter
https://krausefx.com
MIT License
144 stars 13 forks source link

Twitter::Error::Forbidden #3

Open iag3 opened 7 years ago

iag3 commented 7 years ago

Hi Felix,

I love the idea and would like to use it for my twitter account.

Unfortunately Twitter forbids the access to my account. I only follow 250 people and my API, ACCESS Keys are all right. I saw that the Error Code meant that I have exceeded Twitter's APIs limits (source: https://dev.twitter.com/overview/api/response-codes, https://support.twitter.com/articles/15364).

Do you know how to fix that?

Thank you in advance.

This is my output:

/Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/response/raise_error.rb:12:in `on_complete': Unable to verify your credentials (Twitter::Error::Forbidden)
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/response.rb:9:in `block in call'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/response.rb:61:in `on_complete'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/response.rb:8:in `call'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/request/url_encoded.rb:15:in `call'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/request/multipart.rb:14:in `call'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/request/multipart_with_file.rb:21:in `call'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/rack_builder.rb:139:in `build_response'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/connection.rb:377:in `run_request'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/faraday-0.11.0/lib/faraday/connection.rb:177:in `post'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/request.rb:33:in `perform'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:50:in `perform_request'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:72:in `perform_request_with_object'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:64:in `perform_post_with_object'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/oauth.rb:29:in `token'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/headers.rb:38:in `auth_header'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/headers.rb:27:in `request_headers'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/request.rb:31:in `perform'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:50:in `perform_request'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:95:in `perform_request_with_objects'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:139:in `objects_from_response_with_user'
  from /Users/micky-mouse/.rvm/gems/ruby-2.4.0/gems/twitter-6.1.0/lib/twitter/rest/lists.rb:34:in `lists'
  from unfollow.rb:21:in `old_follows_list'
  from unfollow.rb:5:in `run'
  from unfollow.rb:34:in `<main>'
iag3 commented 7 years ago

@KrauseFx

r4dian commented 7 years ago

Thats not what that error means. Try regenerating the keys and make sure they are really available in the Environment.

KrauseFx commented 7 years ago

Thanks @r4dian 👍