title: Switching from Twitter API 1 to 1.1 (adding auth)
body: <p>Currently I use this code to retrieve the latest 6 tweets on my timeline. I read Twitter documentation but I can't understand how to implement the Auth keys of the app I created.</p>
  
  <pre><code>    &lt;?php
      $json = wp_remote_get("http://api.twitter.com/1/statuses/user_timeline/username.json?count=6", true);
      $decode = json_decode($json['body'], true);
      echo "
          &lt;ul style='color:#6E6E6E'&gt;";
          $count = count($decode); //counting the number of status
          for($i=0;$i&lt;$count;$i++){ echo '
          &lt;li&gt;'.$decode[$i]['text'].'&lt;br&gt;&lt;a href='; echo '"http://twitter.com/#!/'.$decode[0][user][name].'/status/'.$decode[$i][id].'"&gt;&lt;small&gt;'. strftime('%e %B',strtotime($decode[$i]['created_at'])) ."&lt;/small&gt;&lt;/a&gt; - &lt;a href='http://twitter.com/intent/tweet?in_reply_to=".$decode[$i][id]."'&gt;&lt;small&gt;rispondi&lt;/small&gt;&lt;/a&gt; - &lt;a href='http://twitter.com/intent/retweet?tweet_id=".$decode[$i][id]."'&gt;&lt;small&gt;retweet&lt;/small&gt;&lt;/a&gt; - &lt;a href='http://twitter.com/intent/favorite?tweet_id=".$decode[$i][id]."'&gt;&lt;small&gt;preferito&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;";} echo "
          &lt;/ul&gt;
      ";
      ?&gt;
  </code></pre>