February 12, 2016
Customized Social Media Buttons (and email)
by Jamie Johnson
What if one wants to share his or her page with the masses using social media or email? There are plenty of options out there. Facebook and Twitter are typical avenues for sharing, and email is important, too. One could go to https://developers.facebook.com/docs/plugins/share-button for a Facebook button and https://about.twitter.com/resources/buttons for a Twitter button and set up a simple mailto: link. However, there are some limitations by way of customization. For example, what if I don't want the typical Facebook or Twitter buttons offered and what if I want to pre-populate the email using the client software? Here is my solution:✉ Email
Put this puppy on f!
Be a Twit and tweet this!
When considering Facebook, make sure to set your open graph (og) meta data properly. For example, here's what I put in this page in the <head> section:
<meta property="og:title" content="Customized Social Media Buttons (and email) by Jamie Johnson" />
<meta property="og:description" content="Want to customize social media buttons (and email) instead of going with the defaults for Facebook and Twitter?" />
<meta property="og:image" content="http://tech.beacondeacon.com/socmediabuttons.jpg" />
<meta property="og:url" content="http://tech.beacondeacon.com/customized-social-media-buttons.html" />
Now, here's the code that makes it work: