2

I need to build a simple web application that gets live data from an API, such as twitter search. I am reading about how to go about this in Javascript (I am not allowed to use jQuery for this assignment). Let's say I want to gather tweets about Bernie Sanders. I just want to see the JSON data in my browser window, but when I paste in the link hit enter, I get the error:

 {"errors":[{"code":215,"message":"Bad Authentication data."}]}

The link I used was https://api.twitter.com/1.1/search/tweets.json?q=Bernie%20Sanders&src=typd. From what I have read, it has to do with 1.1 and Oauth, so I registered an application on twitter and jotted down the consumer and access keys, but I am not sure what to do with them. I really do not know where to begin. If someone could point me in the right direction, I would greatly appreciate it.

Marc Fletcher
  • 932
  • 1
  • 16
  • 39

1 Answers1

0

You have to follow the OAuth 1.0 Protocol.

SaumyadipDev
  • 225
  • 2
  • 5