· 9 years ago · Nov 07, 2016, 02:06 PM
1$consumerKey = 'consumerkey';
2$consumerSecret = 'secret';
3$oAuthToken = 'oauth-token';
4$oAuthSecret = 'oauth-secret';
5require_once('twitteroauth.php');
6$tweet = new TwitterOAuth($consumerKey, $consumerSecret, $oAuthToken, $oAuthSecret);
7echo $tweet->post('direct_messages/new', array('screen_name' => 'SCREEN-NAME-USER', 'text' => 'Hell ha wrrrrrrr......'));