3

I'm using this library ... http://github.com/abraham/twitteroauth

I am able to update statuses and stuff but can't seem to find a function for direct messages.

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

Suhas
  • 31
  • 1
  • 2

1 Answers1

7

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'));

abraham
  • 46,583
  • 10
  • 100
  • 152