-1

I am creating a website with HTML, CSS, JS, etc... But I am not using Wordpress and I am not sure how can I add buttons to share news like you do with social sharing plugins in Wordpres. Anybody knows any Jquery plugin or method?

Thanks

1 Answers1

0

To show the title and photo you want, you need to use the open graph protocols. This is a meta tag that tells facebook (or other social media) how to display your website.

<head>
  <meta property="og:locale" content="en_US" />
  <meta property="og:type" content="website" />
  <meta property="og:title" content="Example Title" />
  <meta property="og:description" content="This is a description of the page I'm sharing..." />
  <meta property="og:url" content="http://www.example.com" />
  <meta property="og:image" content="http://www.example.com/images/image1.jpg" />
</head>

You can create a share button here (for facebook), here (for Twitter) and here (for Google Plus). Just google for other social media buttons.

Hope this helps!

Community
  • 1
  • 1
YentlPauwels
  • 38
  • 2
  • 11
  • Thanks that is really helpful. Is there any way to match the Open graph protocols with some id of a

    tag so I don´t need to rewrite it again every time?

    – Hector de Prada Feb 01 '16 at 16:28
  • If you want do add it dynamically check this post http://stackoverflow.com/questions/8431694/generating-facebook-open-graph-meta-tags-dynamically – YentlPauwels Feb 01 '16 at 17:00