Stream direct messages using node.js API in twit



Has anyone successfully used twit package in nodejs and streamed direct messages? If yes,
please let me know how you have done it.


Am still waiting for an answer


You’ll need to listen to the user streams messages. What endpoint are you connecting to?


Thanks Andy. Got this working.
Below is the code in node.js

var stream =‘user’);
stream.on(‘direct_message’, function(eventMsg)

The above call works. What I could not find easily was that, I had to set only the text and the screen_name to reply to a direct message.




Were you able to reply to the direct message received using twit.
Can you paste the code snippet