Problems with miniature link formatting

Asked

Viewed 4,297 times

2

Well, I did a topic earlier on the same subject, the content appeared but the image does not appear.

Follows the code:

<!--PARA ACEITAR ACENTOS-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<!--CONTEÚDO EM PORTUGUÊS-->
<meta property="og:locale" content="pt_BR">

<!--URL DO SITE-->
<meta property="og:url" content="http://www.meudomínio.com/index.php">

<!--TÍTULO E NOME DO SITE-->
<meta property="og:title" content="TítuloSite">
<meta property="og:site_name" content="Nome do site">

<!-- DESCRIÇÃO DO SITE-->
<meta property="og:description" content="descrição site.">  

<!-- IMAGEM DO SITE -->
<meta property="og:image" content="images/intro.jpg"/>
<meta property="og:image:type" content="image/jpeg">
<meta property="og:image:width" content="800">
<meta property="og:image:height" content="600">

Note: I checked the extension, I have doubt of a detail. The image is quite large... and also it is all in the head.

  • Use this in facebook sharing?

  • I used the facebook debugger and gave the following message: The "og:image" property should be provided explicitly, even if a value can be deduced from other tags. The following two mandatory properties are missing: og:url, og:type, og:title, og:image, og:Description, fb:app_id

1 answer

1


Apparently you are having trouble with the tags that the Debugger accused:

og:url

<meta property="og:url" content="http://www.meusite.com.br/ola-mundo">

og:title

<property="og:title"> It specifies the title of the page, as well as this: "That is the name of My page".

<property="og:site_name"> Specifies site name: Stackoverflow.

og:Description

<meta property="og:description" content="Descrição da sua página">

Tag og:image:type try changing the type to content="image/jpg" and not .jpeg

You can read more about the og:tags here: https://tableless.com.br/utilizando-meta-tags-facebook/

About the <meta property="fb:app_id"> She is an "identification code" type content="1234567890" that you have to ask Facebook. The subject is denser, and you have to evaluate if it is worth it. Here is the document~ao oficial https://developers.facebook.com/docs/sharing/opengraph/using-objects?locale=pt_BR


Now about the size of the image. This link has the best practices settings of Facebook https://developers.facebook.com/docs/sharing/best-practices#images

Image sizes: (To use as the "avatar" I would recommend using 200x200)

The minimum image size is 200 x 200 pixels. If you try to use a smaller image than this, you will see an error in

Image sizes Use images with at least 1200 x 630 pixels to the best display on high resolution devices. At the very least, you should use images that have 600 x 315 pixels to display posts on the link page with larger images. The maximum size of the images is 8 MB.

inserir a descrição da imagem aqui

Another interesting article in English: https://www.h3xed.com/web-and-internet/how-to-use-og-image-meta-tag-facebook-reddit

  • Thank you for sharing the content. I will read them all and insist.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.