简体   繁体   中英

When posting a page from my website on LinkedIn, - Building HTML pages with 'og' meta tags to be LinkedIn friendly

How does one control what image and title appear when posting a URL to LinkedIn? I manage my company's website efficienty and write all the HTML, CSS, jS and PHP when necessary. One nut I cannot crack however is getting LinkedIn to pull the correct image and title when I make a post.

LinkedIn published the following to allow og tags to solve this problem:

I am having difficulty making this work

This is key for me and my team for we frequently post stories, case studies and advertisements which we can't share on LinkdIn because LinkedIn logic usually (not always) doesn't pick up any of the images in our HTML. Is there a meta tag or something I need to embed in the HTML line?

You can use this tool to test https://www.linkedin.com/post-inspector/inspect/ your page. Linkedin seems to be using the open graph protocol from Facebook https://ogp.me/

<meta name="image" property="og:image" content="[Image URL here]">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM