How do I choose which photo will appear on Facebook when sharing a page?

Asked

Viewed 96 times

0

I just made a website for a friend that will be used for an event, in the middle of the site has a part that presents the special guests with description and everything else. When it comes to sharing the site link on Facebook, a photo of one of the guests appears and not the first photo on the site, which is supposedly the poster.

There is some kind of command for me to put the photo I want as being the "main" photo of the site?

1 answer

3

For integration with Facebook, you need tags meta opengraph.

The image specifically is this:

<meta property="og:image" content="https://dominio/imagem"/>

In this case, you can even select a specific image for Facebook, with the cutout most suitable for the display, and not necessarily need to be used on the page.

If you want to add multiple images, just put the tag more than once. In this case, Facebook will prioritize them in order that tags meta were placed in the code, from the first to the last, but depending on the context and format, you can use others. See more detail and optimal image dimensions in the link to the official documentation at the end of the reply.

Obviously for a better user experience, the image has to make sense in context, so it is convenient that it is something that the user will actually find when clicking on the link. For example, a version or cutout of any relevant part of the poster, or a reformatted version for display on Facebook.

Watch out for all the tags needed to specify the object’s settings, so that Facebook recognizes the data.

More details in the specification:

Facebook Open Graph - Object Properties

  • I’ve used this tag and it didn’t work and I’ve also deleted the photos of the special guests and continues to appear anyway with the tags

  • As I commented, you have to opengraph the basic items correctly, not just use the loose tag. Also, in the first use, if you do not use Lint from facebook, it may take time for the result to appear. The way is basically this, changing the images on the page will not solve.

  • 1

    If you want to test FB indexing, this is the link: https://developers.facebook.com/tools/debug/

Browser other questions tagged

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