user_block: Blocking or unblocking twitter users

View source: R/post-block.R

user_blockR Documentation

Blocking or unblocking twitter users

Description

user_block(...) blocks or unblocks a target twitter user. user_unblock(...) is synonymous to user_block(..., unblock=TRUE).

Usage

user_block(user, unblock = FALSE, token = NULL)

user_unblock(user, token = NULL)

Arguments

user

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

unblock

Logical indicating whether to unblock the intended friend.

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

Block: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-blocks-create

Examples

if (auth_has_default()) {
  user_block("rtweet")
  user_unblock("rtweet")
  user_block("rtweet", unblock=TRUE) #<-same as the above
}

rtweet documentation built on Oct. 17, 2023, 1:11 a.m.