In the presence there is a one-page site from which it is necessary to display a particular picture (the picture is selected dynamically using jquery), which can later be divided into social. networks (VK, FB, Twitter).

For VK:

if I initially prescribe the data-image = "imageUrl" attribute, then the image appears at the repost. But when I form this attribute dynamically, then in the address bar you can see that the image is not transmitted and it is picked up by default (not needed by the user).

For FB:

I added several entries to the page's meta tags:

<meta property="og:image" content="http://imagePath/image.png" /> 

When sharing, the picture is taken by default, but you need to fumble specific from the list of pictures.

  • The only solution is to prepare a separate page for each image. - Roman Paradeev
  • I understand correctly that for a single-page this functionality with a sharing cannot be implemented? - Alex Slobodyansky
  • To implement. For example, you can share the address of the form my.singlepage.app.ru?image-to-share=<image> . When processing the request, respectively, substitute the corresponding values ​​in the meta tags. - Roman Paradeev

0