Skip to content

Instantly share code, notes, and snippets.

@anttti
Created March 1, 2017 11:53
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 anttti/e9110984195c65cdd70403326b5f0525 to your computer and use it in GitHub Desktop.
Save anttti/e9110984195c65cdd70403326b5f0525 to your computer and use it in GitHub Desktop.
Facebook & Twitter -sharing without SDKs
onShareFB() {
window.open(
'https://www.facebook.com/sharer/sharer.php?u=http://SHARE-URL.com',
'pop',
'width=600, height=400, scrollbars=no'
);
},
onShareTwitter() {
window.open(
'https://twitter.com/intent/tweet?text=http://SHARE-URL.com',
'pop',
'width=600, height=400, scrollbars=no'
);
},
@anttti
Copy link
Author

anttti commented Mar 1, 2017

<meta property="og:title" content="The Rock"/>
<meta property="og:type" content="movie"/>
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/>
<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>
<meta property="og:site_name" content="IMDb"/>
<meta property="fb:admins" content="USER_ID"/>
<meta property="og:description"
      content="A group of U.S. Marines, under command of
               a renegade general, take over Alcatraz and
               threaten San Francisco Bay with biological
               weapons."/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment