How to retrieve Direct Messages and get the message content and title
See original GitHub issueHow would I get the message content and title from sent DMs using this API? I can send it like this but I have no idea on how to parse the recieved Direct Messages from others?
function sendDM(user, text) {
// Either gain already gained session
var session = new Client.Session(device, cookiePath);
// Or if we cant, create a new session
var promise = Client.Session.create(device, cookiePath, 'username', 'password');
promise.then(function(sessionInstance) {
// Search for the User
Client.Account.searchForUser(session, user)
.then(function(accountInstance) {
var userId = accountInstance.id;
// Send a DM
Client.Thread.configureText(session, userId, text)
.then(function(threads) {
var thread = threads[0];
//thread.broadcastText(text);
console.log(thread.items) // -> see conversation
});
});
});
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:14
Top Results From Across the Web
Understand direct messages - Slack
Access your direct messages · Tap the DMs tab to browse all of your DMs. · Tap the Jump to… field to search...
Read more >How to Direct Message (DM) on Twitter - Twitter Help Center
Under Direct Messages, and next to Receive messages from anyone, check the box to allow anyone to send you Direct Messages. To change...
Read more >How to read private messages with PRAW? - Stack Overflow
Use message.text to get the content, and message.subject to get the title. Share.
Read more >Create direct messages and spaces - Android - Google Support
In Chat, you can send a direct message to individuals or groups. Direct messages are private conversations between you and other people. Once...
Read more >Messaging - Messenger Platform - Meta for Developers
Standard Messaging · User sends a message to the Page · User clicks a call-to-action button like Get Started within a Messenger conversation...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

you need to first learn how to debug application in node.js how to use console.log() and inspect properties 😉 it is necessary for any node.js development. Check this out it is a great start https://www.codeschool.com/learn/javascript
@sagardalal21 @Epexa this is really old source and issue, I got rid of Proxy Server because it was nonsense… Make pooling your self it is not hard…