Learn R Programming

rtweet (version 1.2.1)

post_message: Posts direct message from user's Twitter account

Description

Posts direct message from user's Twitter account

Usage

post_message(text, user, media = NULL, token = NULL)

Arguments

text

Character, text of message.

user

Character vector of screen names or user ids. See as_screenname() for more details.

media

File path to image or video media to be included in tweet.

token

Use this to override authentication for a single API call. In many cases you are better off changing the default for all calls. See auth_as() for details.

References

https://developer.twitter.com/en/docs/twitter-api/v1/direct-messages/sending-and-receiving/api-reference/new-event