Skip to contents

Make a post on Bluesky Social

Usage

bs_post(
  text,
  images,
  images_alt,
  video,
  video_alt,
  langs,
  reply,
  quote,
  emoji = TRUE,
  max_tries,
  user = get_bluesky_user(),
  pass = get_bluesky_pass(),
  auth = bs_auth(user, pass),
  clean = TRUE
)

Arguments

text

text of post

images

character vector of paths to images to attach to post

images_alt

character vector of alt text for images. Must be same length as images if used.

video

character vector of path for up to one video to attach to post

video_alt

character vector, length one, of alt text for video, if used.

langs

character vector of languages in BCP-47 format

reply

character vector with link to the parent post to reply to

quote

character vector with link to a post to quote

emoji

boolean. Default is TRUE. Should :emoji: style references be converted?

max_tries

Integer, >= 2. Number of times to retry the request if the first fails.

user

Character. User name to log in with. Defaults to get_bluesky_user().

pass

Character. App password to log in with. Defaults to get_bluesky_pass().

auth

Authentication information. Defaults to bs_auth(user, pass).

clean

Logical. Should output be cleaned into a tibble? Default: TRUE.

Value

a tibble::tibble of post information

Details

:emoji: parsing is not a formally supported Bluesky feature. This package converts usages of this kind by identifying text within :s, here "emoji" and then matches them to the emoji package's list of emoji names. All supported emoji names and corresponding images can be seen with emoji::emoji_name. This feature was introduced in v0.2.0.

Function introduced

v0.0.1 (2023-10-02)

Examples

if (FALSE) { # has_bluesky_pass() & has_bluesky_user()
bs_post('Test post from R CMD Check for r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)')
bs_post('Test self-reply from r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)',
  reply = 'https://bsky.app/profile/bskyr.bsky.social/post/3kexwuoyqj32g'
)
bs_post('Test quoting from r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)',
  quote = 'https://bsky.app/profile/bskyr.bsky.social/post/3kf24wd6cmb2a'
)
bs_post('Test quote and reply from r package `bskyr`
via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)',
  reply = 'https://bsky.app/profile/bskyr.bsky.social/post/3kexwuoyqj32g',
  quote = 'https://bsky.app/profile/bskyr.bsky.social/post/3kf24wd6cmb2a'
)

bs_post('Test quote with :emoji: and :fire: and :confetti_ball: from r package
  `bskyr` via @bskyr.bsky.social (https://christophertkenny.com/bskyr/)')

bs_post(text = 'testing sending videos from R',
  video = fs::path_package('bskyr', 'man/figures/pkgs.mp4'),
  video_alt = 'a carousel of package logos, all hexagonal')
}