Post to LinkedIn
Arguments
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.
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!")
} # }