title: How to connect to Twitter with API 1.1 possibly using OAuth authentication?
body: <p>I have made a website + a project in Arduino that both fetches tweets from my own <a href="http://en.wikipedia.org/wiki/Twitter" rel="nofollow">Twitter</a> account and acts according to these. Today the Twitter API changed to version 1.1 and now my website doesn't work.</p>
  
  <p>On my website I have been using JavaScript with this code: </p>
  
  <pre><code>var twitter_api_url = 'http://search.twitter.com/search.json';" 
  $.getJSON( twitter_api_url  + '?callback=?&amp;rpp=5&amp;q=from:' + twitter_user, function(data) { ". 
  </code></pre>
  
  <p>This is not working, and I don't know how to change it. </p>
  
  <p>In Arduino I call:</p>
  
  <pre><code>client.println("GET /1/statuses/user_timeline.xml?screen_name=MYTWITTER HTTP/1.1");
  client.println("Host:api.twitter.com");
  client.println("Connection:close");
  client.println();
  </code></pre>
  
  <p>I get error message 410 (gone) and "The Twitter REST API v1 will soon stop functioning. Please migrate to API v1.1. <a href="https://dev.twitter.com/docs/api/1.1/overview" rel="nofollow">https://dev.twitter.com/docs/api/1.1/overview</a>". </p>
  
  <p>I have tried searching for fixes, but I can't find the correct solution. Might I need to make an <a href="http://en.wikipedia.org/wiki/OAuth" rel="nofollow">OAuth</a> authentication? I found a guide to create parameters for this, <em><a href="http://www.slideshare.net/Tweetganic/generate-twitter-applications" rel="nofollow">generate Twitter applications keys</a></em>, but I don't know how to add the parameters to JavaScript or Arduino code.</p>
  
  <p>I found a suggestion for Arduino: </p>
  
  <pre><code>client.print(F("GET /1/statuses/user_timeline.xml?screen_name=MYTWITTER HTTP/1.1"));
  client.print(F("HOST: api.twitter.com"));
  client.print(F("Authorization: OAuth oauth_consumer_key=\"XXX\", oauth_nonce=\"XXX\", oauth_signature=\"XXX\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1361444134\", oauth_token=\"XXX\", oauth_version=\"1.0\""));
  client.println();
  client.println();
  </code></pre>
  
  <p>But what is <code>oauth_nonce</code>, <code>oauth_signature</code> and <code>oauth_timestamp</code> supposed to be? Another user also replied that this didn't work, so I don't know if I want to continue with it.    </p>
  
  <p>How can I fix this problem?</p>