Is that actually required?
I'm not at my computer right now, but as far as I remember most LinkedIn posts are viewable without logging in if you use the direct URLs, for example:
https://www.linkedin.com/feed/update/urn:li:ugcPost:<post_id>
https://www.linkedin.com/feed/update/urn:li:activity:<activity_id>
Unless something changed recently, those links should work anonymously.