Answer the question
In order to leave comments, you need to log in
Why don't share buttons work?
I'm trying to make custom share buttons.
https://vk.com/dev/share_details found here how to do it.
<a href="http://vk.com/share.php?url=http://landing:90/" target="_blank" class="share__btn">
<i class="fa fa-vk"></i>
</a>
<a href="http://www.facebook.com/sharer.php?u=http://scand.pancakeapps.com/" target="_blank" class="share__btn">
<i class="fa fa-facebook"></i>
</a>
<head>
<!-- Meta -->
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="title" content="Заголовок статьи" />
<meta name="description" content="Описание статьи.
Это очень интересная статья." />
<link rel="image_src" href="https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/MilfordSound.jpg/600px-MilfordSound.jpg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Заголовок"/><br/>
<meta property="og:description" content="Описание"/><br/>
<meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/4/42/MilfordSound.jpg/600px-MilfordSound.jpg"/>
<!-- Tags -->
<title>Landing Page</title>
<!-- Links -->
</head>
Answer the question
In order to leave comments, you need to log in
If you are careful, the script is also connected there
without the VKontakte api, nothing will work for you, with Facebook, similarly to
PS, I didn’t see the script in your code, but in general look for a bunch of services, and don’t suffer
here 1 at the link in Google
https:/ /share.pluso.ru/
So what is this link? landing:90 Of course, VK can't access it!
It is necessary to indicate a link to which VK can go. And he will take the names, pictures and text himself. Or you can specify them yourself through the parameters &title=&description=& image=
I use the following code for myself:
Share = {
vk: function (purl, ptitle, pimg, text) {
url = 'http://vk.com/share.php?';
url += 'url=' + encodeURIComponent(purl);
url += '&title=' + encodeURIComponent(ptitle);
url += '&description=' + encodeURIComponent(text);
url += '&image=' + encodeURIComponent(pimg);
url += '&noparse=true';
Share.popup(url);
},
ok: function (purl, text) {
url = 'http://www.odnoklassniki.ru/dk?st.cmd=addShare&st.s=1';
url += '&st.comments=' + encodeURIComponent(text);
url += '&st._surl=' + encodeURIComponent(purl);
Share.popup(url);
},
fb: function (purl) {
url = 'http://www.facebook.com/sharer/sharer.php?';
url += 'u=' + encodeURIComponent(purl);
Share.popup(url);
},
popup: function (url) {
window.open(url, '', 'toolbar=0,status=0,width=626,height=436');
}
};
<div class="buttons">
<a onclick="Share.vk('http://yandex.ru'','название','описание.')"><i class="fa fa-vk"></i></a>
<a onclick="Share.ok('http://yandex.ru'','описание')"><i class="fa fa-ok"></i></a>
<a onclick="Share.fb('http://yandex.ru')"><i class="fa fa-facebook"></i></a>
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question