[Solved] How can i upload and post an image to linkedin using api?


Use Linkedin V2 API.Below code will upload the image.

curl -i --upload-file /Users/peter/Desktop/superneatimage.png --header "Authorization: Bearer redacted" 'https://api.linkedin.com/mediaUpload/C5522AQGTYER3k3ByHQ/feedshare-uploadedImage/0?ca=vector_feedshare&cn=uploads&m=AQJbrN86Zm265gAAAWemyz2pxPSgONtBiZdchrgG872QltnfYjnMdb2j3A&app=1953784&sync=0&v=beta&ut=2H-IhpbfXrRow1'

I suggest you to use Guzzle HTTP client to exicute this in your PHP application

solved How can i upload and post an image to linkedin using api?