Skip to content

Instantly share code, notes, and snippets.

@eunjae-lee
Last active December 22, 2015 08:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eunjae-lee/6446229 to your computer and use it in GitHub Desktop.
Save eunjae-lee/6446229 to your computer and use it in GitHub Desktop.
function openTwitterShare() {
var msg = ".......";
window.open(
'https://twitter.com/intent/tweet?source=webclient&text='+encodeURIComponent(msg),
'twitter',
'width=626,height=330');
}
function openFacebookShare() {
var url = "........";
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(url),
'facebook-share-dialog',
'width=626,height=436');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment