post: Post Tweet

View source: R/tweet.R

postR Documentation

Post Tweet

Description

Post Tweet

Usage

post(x, ...)

## S3 method for class 'hal_documents'
post(x, log = NULL, select = NULL, silent = TRUE, test = FALSE, ...)

## S3 method for class 'rss_items'
post(x, log = NULL, select = NULL, silent = TRUE, test = FALSE, ...)

## S3 method for class 'messages'
post(x, silent = TRUE, test = FALSE, ...)

## S3 method for class 'message'
post(x, silent = TRUE, test = FALSE, ...)

Arguments

x

A list of messages.

...

Currently not used.

log

A character string giving the path of the log file (see below).

select

An integer or a logical vector specifying the indices of the messages to be posted.

silent

A logical scalar: should the report of error messages be suppressed?

test

A logical scalar.

Value

Invisibly returns the tweet date, time and status id.

Prevent Double Post

A log file can be used to avoid posting the same documents several times. This file records the unique identifier of each message (generated by compose()). The log file must have four columns separated by a single white space:

  • Date (YYYY-MM-DD);

  • Time (HH-MM-SS);

  • Tweet status id;

  • Message unique id.

Note

Authenticate via access token (see vignette("auth", package = "rtweet")).

Author(s)

N. Frerebeau


nfrerebeau/twitterbot documentation built on Jan. 30, 2023, 1:12 p.m.