Upload Media to LinkedIn
li_media_upload.Rd
The li_media_upload
function uploads a media
file (e.g., an image) to LinkedIn
for use in posts or other content. It first
initializes the upload process with
LinkedIn’s API, then uploads the media file to
the provided upload URL.
Value
A character string representing the LinkedIn image URL that can be used to reference the uploaded media in subsequent API calls.
Details
The function performs the following steps:
Initializes the media upload by sending a request to the LinkedIn API.
Extracts the
uploadUrl
from the response, which specifies where to upload the media file.Uploads the media file to the
uploadUrl
.Returns the image URL generated by LinkedIn for referencing the uploaded file.
The li_req()
function, assumed to create an
authenticated LinkedIn API request,
must be available in the calling environment.