Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Sends a new direct message to the specified user from the authenticating user.
- * Requires both the user and text parameters. Returns the sent message in the requested format when successful.
- *
- * @return array
- * @param string $text The text of your direct message. Be sure to URL encode as necessary, and keep it under 140 characters.
- * @param string[optional] $id Specifies the ID or screen name of the user for whom to return results for.
- * @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.
- * @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.
- */
- public function directMessagesNew($text, $id = null, $userId = null, $screenName = null)
- {
- // validate
- 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