Answer the question
In order to leave comments, you need to log in
How to automatically share a post on social networks?
Hello! I want to make such a trick:
When creating a post, at the bottom of the page (before the publish button it says send your post to social networks) and there are checkboxes:
VK, Googleplus, FB, etc.
Here's what happened:
var popup = window.open(' [url]https://plus.google.com/share?url=http://aforizmus.com/aphorism/1484[/url]', width = 350, height = 200);
popup.blur();
popup.focus();
var popup1 = window.open('https://www.facebook.com/sharer/sharer.php?src=sp&u=http://aforizmus.com/aphorism/1484', width = 400, height = 150);
popup1.blur();
popup1.focus();
var popup2 = window.open('https://twitter.com/intent/tweet?text=' + $('#TextBL').val() + ' &url=http://aforizmus.com/aphorism/' + $('#hiddenID').val() + ' ', width = 350, height = 150);
popup2.blur();
popup2.focus();
var popup3 = window.open('http://connect.ok.ru/dk?st.cmd=WidgetSharePreview&st.shareUrl=http://aforizmus.com/aphorism/' + $('#hiddenID').val() + '&st.comments=' + $('#TextBL').val(), width = 350, height = 150);
popup3.blur();
popup3.focus();
var popup4 = window.open('http://vk.com/share.php?url=http://aforizmus.com/aphorism/' + $('#hiddenID').val() + '', width = 300, height = 350);
popup4.blur();
popup4.focus();
var popup5 = window.open('http://connect.mail.ru/share?url=http://aforizmus.com/aphorism/' + $('#hiddenID').val()+' &description= '+$('#TextBL').val() +' ', width = 300, height = 350);
popup5.blur();
popup5.focus();
Answer the question
In order to leave comments, you need to log in
You are still lucky, for many people pop-up windows do not pop up at all.
The idea of an adequate implementation: to make a pop-up dialog, in which the iframes of the necessary social networks will be displayed one by one. At the same time, you can fasten the progressbar.
Of the minuses: if your pages are opened via HTTPS, then frames with HTTP will not be displayed due to security policy, in the opposite direction - you can.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question