title: Retrieving specific direct message information via PHP using API 1.1
body: <p>I'm hoping you can help as I think I'm missing a trick here and can't find where I'm going wrong. I am looking to retrieve a few specific pieces of info from Twitter DMs via PHP. I've written some code to pull through what I'm after, but when running the script, only the message (tweet), ID, and date sent are pulling through. The rest like user name etc... remains blank. The current output can be found here: <a href="http://anonytine.hol.es/TDM94.php" rel="nofollow">http://anonytine.hol.es/TDM94.php</a></p>
  
  <p>Any help would be greatly appreciated:</p>
  
  <pre><code>  &lt;?php
  echo "&lt;h2&gt;Simple Twitter API Test&lt;/h2&gt;";
  
  ini_set('display_errors', 1);
  require_once('TwitterAPIExchange.php'); 
  
  
  $settings = array(
  'oauth_access_token' =&gt; "XXXX",
  'oauth_access_token_secret' =&gt; "XXXX",
  'consumer_key' =&gt; "XXXX",
  'consumer_secret' =&gt; "XXXX"
  );
  $url = 'https://api.twitter.com/1.1/direct_messages.json';
  $getfield = '?since_id=240136858829479935&amp;count=20';
  $requestMethod = 'GET';
  $twitter = new TwitterAPIExchange($settings);
  $string = json_decode($twitter-&gt;setGetfield($getfield)
           -&gt;buildOauth($url, $requestMethod)
           -&gt;performRequest(),$assoc = TRUE);
  
  echo "&lt;h3&gt;Direct Messages&lt;/h3&gt;";          
  foreach($string as $items)
    {
      echo "Time and Date of Tweet: ".$items['created_at']."&lt;br /&gt;";
      echo "Message ID: ".$items['id']."&lt;br /&gt;";
      echo "Tweet: ".$items['text']."&lt;br /&gt;";
      echo "Tweeted by: ". $items['user']['name']."&lt;br /&gt;";
      echo "Screen name: ". $items['user']['screen_name']."&lt;br /&gt;";
      echo "Location: ". $items['user']['geo_enabled']."&lt;br /&gt;";
      echo "Friends: ". $items['user']['friends_count']."&lt;br /&gt;";
      echo "Listed: ". $items['user']['listed_count']."&lt;br /&gt;&lt;hr /&gt;";
    }
  {
  
  ?&gt;
  </code></pre>