Linkedin Share is not fetching the thumbnail image while sharing?
Asked Answered
R

2

0

I am trying to share linked-in for a page in drupal. In that page there is a image, still the thumbnail image is missing while sharing the page in linked-in. This is my linked-in sharing code.

<a href='http://www.linkedin.com/shareArticle?mini=true&url=<?php print $tiny_bit_url;?>&amp;title=<?php print $data->node_title;?>&summary=<?php print $summary; ?>'>
<img src="linkedin-icon.png"/>
</a>

What is that I am missing w.r.t image being shared as thumbnail from that page to linked-in share.

Thanks in advance.

Rafaelarafaelia answered 31/3, 2015 at 9:11 Comment(0)
D
3

LinkedIn's crawler will go to whatever the value of $tiny_bit_url is and attempt to determine the image to show based on the presence of OpenGraph tags in the page, and failing that, its own logic to attempt to pick the most relevant image on the page to showcase.

Additional documentation on how to best format your page content for sharing can be found here: https://developer.linkedin.com/docs/share-on-linkedin#opengraph

Derm answered 31/3, 2015 at 17:54 Comment(0)
A
0

Use og: tags on your page to indicate data you want LinkedIn to use, for instance...

  • <meta property='og:title' content='Title of the article"/>
  • <meta property='og:image' content='//media.example.com/ 1234567.jpg"/>
  • <meta property='og:description' content='Description that will show in the preview"/>
  • <meta property='og:url' content='//www.example.com/URL of the article" />

Source: LinkedIn Developer Docs: Making Your Website Shareable on LinkedIn.

Want to be able to check and verify that you did it correctly? Input your URL into the LinkedIn Post Inspector.

Amrita answered 31/5, 2020 at 15:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.