There is an online magazine site. There is one template in which I load the content of each individual article. Each article accordingly has its own fb "share" buttons.
And here I have a difficulty:
I want to post in fb my own title picture from each article. For this you need to prescribe <meta class="img-meta" property="og:image" content="прямая ссылка на нужную картинку" /> . Of course, I prescribe the content parameter with a script based on the downloaded content, but the crawler fb, performing the scraping of the page, js does not launch at all, reads only HTML in which I can register a link only to a single image.
How to deal with this?

  • one
    Yes, in general, no way. You yourself answered: "js does not launch at all". Those. You need to find the opportunity to register a link to the image in the process of generating the page. So that the loaded HTML already had the final version of <meta> - cyadvert

1 answer 1

Well, actually, I decided to write these metatags with php. From the address bar to get the path to the folder with the article and from there from the additional json to get all the necessary information.