Home javascript Implement Share-button social networks?

Implement Share-button social networks?

Author

Date

Category

You need to implement the opportunity through the site publication in social networks.
I tried, for example, in VK the next:

url = 'http://vk.com/share.php?';
    URL + = 'URL =' + ENCODEURICOMPONENT ('MYSITE.COM');
    url + = '& amp; title =' + encodeuricomponent ('title');
    url + = '& amp; description =' + encodeuricomponent ('description');
    url + = '& amp; noparse = true';
    Window.open (URL, '', 'Toolbar = 0, Status = 0, width = 626, height = 436');

But faced by the fact that from the field Description the post comment section (in Popha) is not filled.
Plus, the button does not work, tell friends on the page, but the moment is working, if you send an entry to a private message.

tried the option from Doki VK, problems identical:

& lt; script type = "text / javascript" src = "https://vk.com/js/api/share .js? 93 "charset =" windows-1251 "& gt; & lt; / script & gt;
& lt; script type = "text / javascript" & gt;
...
Document.Write (vk.Share.Button ({
 URL: 'http://mysite.com',
 Title: 'page title',
 Description: 'This is my own website, I did it for a very long thing'
 image: 'http://mysite.com/mypic.jpg',
 Noparse: True.
}));

Is there any finished basic Shinga pattern in social networks (without downloading packets in NPM)?

I would need vk, fb, twitter.


Answer 1

For a while I used http://share42.com/en

Quickly and convenient.

I had a hole icons of what you need, downloaded the script, stuck the code below (or similar to CMS, there everything on the page there is), and cheers. 🙂

Also there is a variety of settings, for desercip and the rest. There you can hide variables.

& lt; div class = "share42init" & gt; & lt; / div & gt;
& lt; script Type = "text / javascript" src = "http://site.name/share42/share42.js" & gt; & lt; / script & gt;

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions