How to send a direct message using the Abraham oauth library

I use this library ... http://github.com/abraham/twitteroauth

I can update statuses and more, but I can not find a function for direct messages.

Also, is there any other library that I could use?

+3
source share
1 answer

Sending a direct message works almost the same as posting a status.

$twitteroauth->post('statuses/update', array('status' => 'status text here'));

$twitteroauth->post('direct_messages/new', array('text' => 'dm text here', 'screen_name' => 'recipients screen_name'));

+8
source

Source: https://habr.com/ru/post/1763081/


All Articles