I have interest in showcasing LinkedIn posts too.
LinkedIn posts can offer code to Embed this post, like:
<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:7289953683264434176"
height="665" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>
Could we get LinkedIn support too please?
Do you know if LinkedIn provides an API to get post data? Couldn’t see one in a quick search, but that’s probably what is needed. Otherwise just using their <iframe> code directly may be the best people can do.
I think this might be the API: https://learn.microsoft.com/en-us/linkedin/marketing/community-management/shares/posts-api?view=li-lms-2025-01&tabs=http#get-posts-by-urn
Looks like it might be. It does require authorization though, for example this request for data for the embed you shared above:
curl -X POST 'https://api.linkedin.com/rest/posts/7289953683264434176' -H 'X-Restli-Protocol-Version: 2.0.0' -H 'LinkedIn-Version: 202412' --data ''
Returns:
{"status":401,"serviceErrorCode":65604,"code":"EMPTY_ACCESS_TOKEN","message":"Empty oauth2 access token"}
That does mean I’m personally very unlikely to implement this as I don’t have a LinkedIn account (which would also complicate testing I guess as tests in this repo would need a token). But maybe someone is interested in working on it.