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

2

5

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.

Pozzuoli answered 5/3, 2012 at 15:33 Comment(0)
A
21

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

Aleshia answered 6/3, 2012 at 18:16 Comment(2)
The rescraping is invaluable if you own the property and want to force the update through. Adding a param like ?linkedin will also trickle down to URLs without the param.Sheree
This is not working for me, py pages have all needed metatags and the Linkedin share plugin still get wrong content (I don't know were it took it for example the name of the post/article is one and is taking the content from an h3 missed in the html page code.)Homophone
C
5

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" />
Catina answered 27/6, 2018 at 0:59 Comment(2)
I don't know is it luck or feature. My website got scraped a day before and had a wrong meta image value. After that i edited meta image to correct value and tested it with linkedin.com/post-inspector and after 10 mins linked in rescraped my website and changes to meta image are reflected.Duplessis
@AjayNaredla that's cause it's not scrapping it till you share the url, i.e. it fetches when you share and renders what is currently on your site. Probably wont change anything already shared via linked in (although may fetch every time regardless).Neoclassic

© 2022 - 2024 — McMap. All rights reserved.