| dmGet {twitteR} | R Documentation |
These functions allow you to interact with, send, and delete direct messages (DMs) in Twitter.
dmGet(session = getCurlHandle()) dmSent(session = getCurlHandle()) dmDestroy(dm, session = getCurlHandle()) dmSend(text, user, session = getCurlHandle())
text |
The text of a message to send |
user |
The user to send a message to, either character or
an user object. |
dm |
The message to delete, an object of class directMessage |
session |
A session object from initSession |
The dmGet and dmSent functions will return a list of
directMessage objects. The former will retrieve DMs
sent to the user while the latter retrieves messages sent from the user.
The dmDestroy function takes a directMessage
object (perhaps from either dmGet or dmSent) and will
delete it from the Twitter server.
The dmSend function will send a message to another Twitter user.
Jeff Gentry
## Not run:
sess <- initSession('myuser', 'mypass')
dms <- dmGet(sess)
dms
## delete the first one
dmDestroy(dms[[1]])
## send a DM
dmSend('Testing out twitteR!', 'twitter', sess)
## End(Not run)