How to create a Facebook Share Button
Step-by-Step
- Visit https://developers.facebook.com/docs/plugins/share-button
- Pick the URL of a website or Facebook Page you want to share.
- Paste the URL to the Code Configurator and adjust the layout of your share button. Click the Get Code button to generate your share button code.
- Copy and paste the snippet into the HTML of the destination website.
- If you can code, you can edit the code snippet below and paste it into the HTML of the destination website.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<html> <head> <title>Your Website Title</title> <!-- You can use Open Graph tags to customize link previews. Learn more: https://developers.facebook.com/docs/sharing/webmasters --> <meta property="og:url" content="https://www.your-domain.com/your-page.html" /> <meta property="og:type" content="website" /> <meta property="og:title" content="Your Website Title" /> <meta property="og:description" content="Your description" /> <meta property="og:image" content="https://www.your-domain.com/path/image.jpg" /> </head> <body> <!-- Load Facebook SDK for JavaScript --> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <!-- Your share button code --> <div class="fb-share-button" data-href="https://www.your-domain.com/your-page.html" data-layout="button_count"> </div> </body> </html> |
How to create a Twitter Share Button
Step-by-Step
- Visit https://publish.twitter.com/#
- Select “Twitter Buttons”.
- Choose “Share Button”.
- Copy and paste the snippet into the HTML of the destination website
1 |
<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-show-count="false">Tweet</a><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> |
How to create a Linkedin Share Button
Step-by-Step
- Visit https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/plugins/share-plugin
- Copy the HTML code
- Replace the data-url=”https://www.linkedin.com” with whichever URL you’d like visitors to share
- We have made it easy by bringing the code for you. Using the JavaScript snippet below will generate a LinkedIn Share button. The example below contains a data-URL reference to https://www.linkedin.com. Modify the data URL to include your favorite link, or leave it blank and let your users craft their own shares!
1 2 |
<script src="https://platform.linkedin.com/in.js" type="text/javascript">lang: en_US</script> <script type="IN/Share" data-url="https://www.linkedin.com"></script> |
To modify the data-URL to include your favorite link replace the data-url=”https://www.linkedin.com” with whichever URL you’d like visitors to share.
Step-by-step
- Visit https://sharethis.com/platform/share-buttons/
- There are four options of which type of share button you want, Inline Share Buttons that add share buttons near your headline or product for ideal visibility, Sticky Share Buttons that keep share buttons anchored so visitors can share while they scroll, Image Share Buttons that let your audience share your most powerful visual content, Video Share Buttons that empower your audience to share videos on your site with one click. Under each option, there are “Get started” buttons, click on your chosen option.
- Customize your button or click on “Next”
- Sign up
- Click on “Activate code”
- Copy the generated code and paste it below your <head> tag
- Copy and paste the provided snippet for the share button into the HTML of the destination website.
3 Comments
Comments are closed.