title: Posting a direct message with Twitter API, PHP
body: <p>This is driving me up the wall! I'm trying to make a simple little Twitter app. I've tried a some of the relavent code seen on older question here (maybe the code is out of date?)</p>
  
  <p>I make the connection to twitter, validate with credentials using 
      <code>$connection = new tmhOAuth(array('consumer_key' =&gt;</code>, 
  etc and able to post a tweet like this:</p>
  
  <pre><code>$connection-&gt;request('POST',
  $connection-&gt;url('1/statuses/update'),
  array('status' =&gt; $tweet_text));
  </code></pre>
  
  <p>but when I try to do a direct message, the PHP script seems to hang at this spot:</p>
  
  <p>I've tried it this way:</p>
  
  <pre><code>$connection-&gt;post('1/direct_messages/new', array('text' =&gt; 'dm text here', 'FROM_TWITTER_NAME' =&gt; 'TO_TWITTER_NAME'));
  </code></pre>
  
  <p>I've also tried this:</p>
  
  <pre><code>$method = 'direct_messages/new';
  $receiverScrName = "SCREEN_NAME";
  $parameters = array('screen_name' =&gt; $receiverScrName, 'text' =&gt; 'how are you');
  $connection-&gt;post($method, $parameters);
  </code></pre>
  
  <p>The upper case text is valid twitter names.
  this should be the picture of simplicity and yet I'm about to pull my hair out! Any help would be greatly appreciated!</p>
  
  <p>Thanks,
  Eddie</p>