mercredi 24 mai 2017

2.3.0/gems/twitter-6.1.0/lib/twitter/rest/response/raise_error.rb:13:in `on_complete': Bad Authentication data. (Twitter::Error::BadRequest)

Simply put, I'm attempting to post a tweet using these pieces of ruby code:

require 'Twitter'

client = Twitter::REST::Client.new do |config|
config.consumer_key        = "my_key"
config.consumer_secret     = "my_secret_key"
config.access_token        = "my_token"
config.access_token_secret = "my_secret_token"
end

client.update("I'm tweeting with a @gem!")

I'm using 64-bit ruby 2.3.0 with the appropriate 64-bit dev kit on Windows 10.

However, a `on_complete': Bad Authentication data. (Twitter::Error::BadRequest) appears like so:

C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter /rest/response/raise_error.rb:13:in on_complete': Bad Authentication data. (Twitter::Error::BadRequest) from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/response.rb:9:inblock in call' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/response.rb:61:in on_complete' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/response.rb:8:incall' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/request/url_encoded.rb:15:in call' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/request/multipart.rb:14:incall' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter/rest/request/multipart_with_file.rb:21:in call' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/rack_builder.rb:139:inbuild_response' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/connection.rb:377:in run_request' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/faraday-0.11.0/lib/faraday/connection.rb:177:inpost' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter/rest/request.rb:33:in perform' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:50:inperform_request' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:72:in perform_request_with_object' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter/rest/utils.rb:64:inperform_post_with_object' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib/twitter/rest/tweets.rb:158:in update!' from C:/tools/ruby23/lib/ruby/gems/2.3.0/gems/twitter-6.1.0/lib /twitter/rest/tweets.rb:128:inupdate' from om_tweet.rb:11:in `'

Thanks in advance for your time and advice!

Aucun commentaire:

Enregistrer un commentaire