post_follow: Follows target Twitter user.

View source: R/post-user.R

post_followR Documentation

Follows target Twitter user.

Description

Follows target Twitter user.

Usage

post_follow(
  user,
  destroy = FALSE,
  mute = FALSE,
  notify = FALSE,
  retweets = TRUE,
  token = NULL
)

post_unfollow_user(user, token = NULL)

post_mute(user, token = NULL)

Arguments

user

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

destroy

Logical indicating whether to post (add) or remove (delete) target tweet as favorite.

mute

Logical indicating whether to mute the intended friend (you must already be following this account prior to muting them)

notify

Logical indicating whether to enable notifications for target user. Defaults to false.

retweets

Logical indicating whether to enable retweets for target user. Defaults to true.

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

Update: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-update Create: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-create Destroy: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/follow-search-get-users/api-reference/post-friendships-destroy Mute: https://developer.twitter.com/en/docs/twitter-api/v1/accounts-and-users/mute-block-report-users/api-reference/post-mutes-users-create

See Also

Other post: post_favorite(), post_friendship(), post_tweet()

Examples

if (auth_has_default()) {
    post_follow("_R_Foundation")
    post_follow("rtweet", mute = TRUE) # Mute
}

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