This code connected the block to share in 3 soc. networks.

<script type="text/javascript" src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js" charset="utf-8"></script> <script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script> <div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki"></div> 

Buttons appeared, but this link is harsupesa.wix.com.usrfiles.com by harsupesa.wix.com.usrfiles.com when clicked, a blank page opens with a block to share in the upper left corner. Maybe something needs to be written in the code?

  • If you are given an exhaustive answer, mark it as correct (a daw opposite the selected answer). - Nicolas Chabanovsky

1 answer 1

From the documentation of the block "Share":

By default, the URL of the page where the block is located is specified.

You can specify an arbitrary URL by specifying it in the data attribute:

 <div class="ya-share2" data-services="vkontakte,facebook,odnoklassniki" data-url="https://ya.ru"></div> 

It is also worth considering that some social networks (for example, Facebook) ignore this parameter. To convey the necessary information to them, you should use special markup.

More information about this can be found in the article "How the world of semantic micromarking works . "