title: Need help converting to Twitter API v1.1 - JavaScript
body: <p>Recently Twitter updated its API to v1.1 and my program stops working but no matter how much documentation I read, I can't seem to really understand what is needed to make my codes work. </p>
  
  <p>My used-to-work codes are as below :</p>
  
  <pre><code>function getTweets() {
  
  var url = 'http://search.twitter.com/search.json?q=%23yolo&amp;rpp=10&amp;result_type=recent&amp;callback=?';
  
      $.getJSON(url, function (json) {
  
          display = [];
          displayDateTime = [];
          if (json.results.length != null) {
              for (var i = 0; i &lt; json.results.length; i++) {
                  var time = new Date(json.results[i].created_at);
  
                  display.push("@" + json.results[i].from_user + ": " + json.results[i].text);
                  displayDateTime.push("[" + time.toString().substring(0, 19) + "]");
  
              } //end of for loop
  
              display.reverse();
              displayDateTime.reverse();
  
              loadOtherStuffs();
          } //end of if
          else {
              setTimeout(getTweets, 24000);
          }
      });     //end of getJSON
  }//end of getTweets()
  </code></pre>
  
  <p>I tried changing the url to <a href="https://api.twitter.com/1.1/search/tweets.json" rel="nofollow">https://api.twitter.com/1.1/search/tweets.json</a> and <code>json.results</code> to <code>json.statuses</code> but it still won't work. It seems that there's a need for <code>oAuth</code> to make this work again but I'm not too sure.  </p>
  
  <p>What are exactly the steps to make this work again?</p>