Skip to contents

Post to LinkedIn

Usage

li_posts_write(author, body, dry_run = FALSE)

Arguments

author

Character. URN. Either yours (see li_urn_me() or rOpenSci's "urn:li:organization:77132573")

body

Character. The body of the post as you would like it to appear.

dry_run

Logical. TRUE to show what would be sent to the server without actually sending it.

Value

A string of the URN for the post id.

Examples


# Dry-run
id <- li_posts_write(
  author = ro_urn, # Post on behalf of rOpenSci
  body = "Testing out the LinkedIn API via R and httr2!",
  dry_run = TRUE)
#> Error in token_refresh(client, refresh_token = refresh_token, scope = scope,     token_params = token_params): OAuth failure [invalid_request]
#>  A required parameter "client_secret" is missing

if (FALSE) { # \dontrun{
# Real post
id <- li_posts_write(
  author = ro_urn, # Post on behalf of rOpenSci
  body = "Testing out the LinkedIn API via R and httr2!")
} # }