directMessagesNew() public method

Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters and must be a POST. Returns the sent message in the requested format if successful.
public directMessagesNew ( string[optional] $userId = null, string[optional] $screenName = null, string $text ) : array
$userId string[optional]
$screenName string[optional]
$text string The text of your direct message. Be sure to URL encode as necessary, and keep the message under 140 characters.
return array
Ejemplo n.º 1
0
 /**
  * Tests Twitter->directMessagesNew
  */
 public function testDirectMessagesNew()
 {
     $response = $this->twitter->directMessagesNew(null, 'tijs_dev', 'Running the tests.. 私のさえずりを設定する ' . time());
     $this->isDirectMessage($response);
     $this->twitter->directMessagesDestroy($response['id']);
 }