TruMan1
TruMan1

Reputation: 36078

Meta tags required to feed Facebook and LinkedIn with specific values?

When my page is shared on Facebook or LinkedIn, it always picks something random or inconsistent from the page to choose the title, images, and description. How do I force the social networks to use explicit values for those fields. Do I need meta data in my page head for each? The info seemed scattered and outdated over the web so I appreciate any help.

Upvotes: 5

Views: 27372

Answers (2)

Kirsten Jones
Kirsten Jones

Reputation: 2706

On LinkedIn, if you are sharing using the website or a share button, open graph tags in the page will be honored as detailed here: https://developer.linkedin.com/documents/setting-display-tags-shares

Note that if you have already shared a page it won't get re-scraped for 7 days and there's no way to force a quicker re-scan.

Edited (Mousey)
Facebook link for rescraping, checking which image etc will be found and checking opengraph meta tags https://developers.facebook.com/tools/debug/

LinkedIn will rescrape if you add a parameter on the end, as described in http://beta.beantin.se/clearing-linkedin-link-sharing-preview-cache/

Edit 2022 (Studocwho)
Linkedin now has a Post Inspector which gives you detailed information and debugging, and as a result it also refreshes and re-scrapes the page. It's available here: https://www.linkedin.com/post-inspector/.
This resource was found from this article: https://www.linkedin.com/pulse/how-clear-linkedin-link-preview-cache-ananda-kannan-p/

Apologises unable to post this as a comment

Upvotes: 21

Alien Life Form
Alien Life Form

Reputation: 581

If you don't see your expected share result, go to https://www.linkedin.com/post-inspector/ and type in the site URL, it will show you the expected result AND refresh the cache.

Content of the share is based on the following tags as per https://developer.linkedin.com/documents/setting-display-tags-shares (poached from Kirsten's answer above)

  <meta property="og:title" content="My Shared Article Title" />
  <meta property="og:description" content="Description of shared article" />
  <meta property="og:url" content="http://example.com/my_article.html" />
  <meta property="og:image" content="http://example.com/foo.jpg" />

Upvotes: 5

Related Questions