Skip to contents

Creates a follow relationship between your account and another user on Bluesky Social. This is equivalent to clicking the "Follow" button on a user's profile.

Usage

follow_actor(my_did, actor_did, token)

Arguments

my_did

Character. Your decentralized identifier (DID) obtained from get_token response

actor_did

Character. The DID of the user you want to follow. Can be obtained using get_profiles

token

Character. Authentication token from get_token

Value

An httr2 response object containing:

uri

Character. URI of the created follow record

cid

Character. Content identifier for the follow record

Returns NULL if the follow operation fails.

Examples

if (FALSE) { # \dontrun{
# Authenticate first
auth <- get_token("your.handle.bsky.social", "your-app-password")
token <- auth$accessJwt
my_did <- auth$did

# Get the DID of the user you want to follow
target_profile <- get_profiles("neilhimself.neilgaiman.com", token)
target_did <- target_profile$did

# Follow the user
result <- follow_actor(my_did, target_did, token)

if (!is.null(result)) {
  message("Successfully followed user!")
}

# Follow multiple users
users_to_follow <- c("user1.bsky.social", "user2.bsky.social")
profiles <- get_profiles(users_to_follow, token)

for (i in 1:nrow(profiles)) {
  result <- follow_actor(my_did, profiles$did[i], token)
  Sys.sleep(1) # Be respectful with rate limits
}
} # }