The OpenGraph metag og: image does not take the specific image of the link

2

I have the following code snippet, but facebook is randomly picking up another image that is not part of the specific link for this, og:image as below.

<meta property="og:type" content="website">
<meta property="og:title" content="Acabamentos e Revestimentos">
<meta property="og:description" content="Acabamentos e Revestimentos Guarapari é o Guia Comercial de Guarapari com as melhores opções de Acabamentos e Revestimentos do mercado local.">
<meta property="og:url" content="http://www.guaraparivirtual.com.br/acabamento-e-revestimento-guarapari">
<meta property="og:image" content="http://www.guaraparivirtual.com.br/imagens/guia-comercial-rede-social.jpg">
<meta property="fb:app_id" content="966242223397117">

All other information appears perfectly, just do not get the image specified in the og:image link.

    
asked by anonymous 05.05.2018 / 00:51

1 answer

0

The problem is in the declaration of !DOCTYPE of the pages of the site:

           inválido
              ↓
<!DOCTYPE html!>

The exclamation ! after html is invalid, so the Facebook API is not validating the HTML of the page, considering that meta tags are not in <head> as shown in the Open Graph Object Debugger :

Withthis,thetoolrandomlychoosesanimageofthepage.

Seealsotheerrorpointedoutinthe W3C HTML Validator :

Solution:remove!andleaveonly<!DOCTYPEhtml>,whichisthecorrectstatementforHTML5default.

Totest,openthislinkfromthedebuggerandyouwillseethecorrectimage:

>

Thelinkabovethedebuggerpointsto this test page that I created by copying the source code for your site and fixing the problem.

    
10.05.2018 / 02:54