I am trying to get tweets from Twitter to my Sinatra application. For that I am using REST API v1.0. It shows some functionality error so I am trying to migrate from v1.0 to v1.1. As a part of migration I am using the following code to get response:
response = http.request(Net::HTTP::Get.new("https://api.twitter.com/1.1/search/tweets.json?q=#{search_term}"))
but it shows some error like
{"errors":[{"message":"Bad Authentication data","code":215}]}
How can I fix this?