How to successfully implement og:image for the LinkedIn

前端 未结 13 2719
陌清茗
陌清茗 2020-12-25 10:36

THE PROBLEM:

  • I am trying, without much success, to implement open graph image on site: http://www.guarenty-group.com/cz/
  • The homepage
13条回答
  •  孤城傲影
    2020-12-25 11:11

    Make sure your og: tags are part of the head tag.


    I ran into this recently, spent a huge amount of time working on it with all the types of solutions above. I was working with someone else's HTML and finally figured out that the html was simply missing the head tag, while it did have the closing tag for head.

    Linked In is apparently not scanning page text for the og tags, but processing the page dom, and if the dom objects aren't properly coded, they won't process. If you have issues with unmatched tags or unclosed tags, this could be your issue if everything else is not working.

    I did not need to add prefix to the meta tags or add og image height and width tags once the html was fixed. Linked In processed it fine once the html was fixed.

提交回复
热议问题