# How to add buttons will be shared in VK and OK?

**URL:** <https://meta.discourse.org/t/how-to-add-buttons-will-be-shared-in-vk-and-ok/68463>\
**Category:** Product Support\
**Created:** [21.Август.2017 11:41:16 UTC](https://meta.discourse.org/t/how-to-add-buttons-will-be-shared-in-vk-and-ok/68463 "2017-08-21T11:41:16Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Stranik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stranik/32/85638_2.png) [@Stranik](https://meta.discourse.org/u/Stranik)\
**Post date:** [22.Август.2017 08:17:37 UTC](https://meta.discourse.org/t/how-to-add-buttons-will-be-shared-in-vk-and-ok/68463/2 "2017-08-22T08:17:37Z")

</div>

You can also try

```
<script type="text/discourse-plugin" version="0.4">

 api.decorateWidget('topic-map:before', dec => {
     
 const link = window.location.href;
 const urlfb = "http://www.facebook.com/sharer.php?u=" + encodeURIComponent(link);
 const urlok = "http://www.ok.ru/dk?st.cmd=addShare&st.s=1&st._surl=" + encodeURIComponent(link);
 const urlvk = "https://vk.com/share.php?url=" + encodeURIComponent(link);
 
 return dec.rawHtml(`
 <div class="test"><a class="fb" href="${urlfb}" target="_blank"><i class="fa fa-facebook fa-lg" aria-hidden="true"></i></a>
 <a class="ok" href="${urlok}" target="_blank"><i class="fa fa-odnoklassniki fa-lg" aria-hidden="true"></i></a>
  <a class="vk" href="${urlvk}" target="_blank"><i class="fa fa-vk fa-lg" aria-hidden="true"></i></a>
  </div>`);
  });
  
</script>

```

 ![11](https://global.discourse-cdn.com/meta/original/3X/7/b/7bc519b25445a732249c5ee3abfe7480adb3289e.jpg)

**CSS** -

```
.test {
    display: inline-block;
    margin-top: -50px;
    position: absolute;
}
.test a.ok{
    margin-left: 15px;
    margin-right: 15px;
}
.test a{color: #999;}
.test a:hover{color: #666;}

```

I tried it, do not know right or wrong. Div are, you can change the design as you wish…

---

_[View the full topic](https://meta.discourse.org/t/how-to-add-buttons-will-be-shared-in-vk-and-ok/68463)._
