title: How to make a twitter get request using oauth?
body: <p>I am trying to use jquery to do a get request and download tweets from twitter, except I don't understand how to authenticate the request. I have a twitter account and registered an app, so I can see all its token values. I don't understand how to actually use those values to make a request.</p>
  
  <p>I have this so far:</p>
  
  <pre><code>$(function() {
      var token = "&lt;my token&gt;";
      $.ajax({
          dataType: "json",
          url: "https://api.twitter.com/1.1/favorites/list.json?count=2&amp;screen_name=episod",
          beforeSend: function(xhr) {
              xhr.setRequestHeader("Authorization", token);
          },
          success: function() {alert(2);},
          fail: function() {console.log( "error" );}
      });
  });
  </code></pre>
  
  <p>But where do I use the token values? </p>
  
  <p>Can anyone help please?</p>
  
  <p>Thanks</p>