dmGet {twitteR}R Documentation

Functions to manipulate Twitter direct messages

Description

These functions allow you to interact with, send, and delete direct messages (DMs) in Twitter.

Usage

dmGet(session = getCurlHandle(), num=20, ...)
dmSent(session = getCurlHandle(), ...)
dmDestroy(dm, session = getCurlHandle(), ...)
dmSend(text, user, session = getCurlHandle(), ...)

Arguments

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
num The number of direct messages to return
... Optional arguments to be passed to getURL

Value

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.

Author(s)

Jeff Gentry

See Also

directMessage

Examples

  ## 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)

[Package twitteR version 0.1.5 Index]