Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.05 KB | None | 0 0
  1.     /**
  2.      * Sends a new direct message to the specified user from the authenticating user.
  3.      * Requires both the user and text parameters. Returns the sent message in the requested format when successful.
  4.      *
  5.      * @return  array
  6.      * @param   string $text                    The text of your direct message. Be sure to URL encode as necessary, and keep it under 140 characters.
  7.      * @param   string[optional] $id            Specifies the ID or screen name of the user for whom to return results for.
  8.      * @param   string[optional] $userId        Specfies the screen name of the user for whom to return results for. Helpful for disambiguating when a valid screen name is also a user ID.
  9.      * @param   string[optional] $screenName    Specfies the ID of the user for whom to return results for. Helpful for disambiguating when a valid user ID is also a valid screen name.
  10.      */
  11.     public function directMessagesNew($text, $id = null, $userId = null, $screenName = null)
  12.     {
  13.         // validate
  14.         if($id == '' && $userId == '' && $screenName == '') throw new TwitterException('Specify an id or an userId or a screenName.');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement