How To Add Facebook Share Button To Your Site

Every social networking website provides the freedom to add the official button to the website. Do you know how to add Facebook share button to your site without using any plugin?

WordPress has many social sharing plugins which can help you to add the button. But why would you want to use a plugin if you can do the task without using any?

Facebook is one of the biggest social platforms where you can brand your business and drive traffic to your blog. In this tutorial, you will learn how to add Facebook share button to your site using the official code Facebook provides.

Generate The Code from the Developer’s Page

Just like Twitter follow button, LinkedIn share button, you can go for the Facebook share button.

Every social networking website has the code generators and for Facebook, you have to visit the developer’s page.

Step 1:- If you scroll a little bit down, you will notice a few fields to fill. You have to add the URL you want to get shared.

Step 2:- There is another option to choose the layout of the button. If you want to show the number of counts or not, You can add the box instead of the simple button.

There are many options given in the drop-down menu. The choice will be yours. Just choose your favorite option and generate the code by clicking on the “Get Code” button.

Step 3:- You will notice the codes. The first code consists the Javascript to show the number of counts and for the updates. You have to just copy and paste this code in between the <body> tag of your website.

You can use any plugin to embed the code or if you have a little bit of knowledge about HTML then just add it manually in the theme files of your website.

Step 4:- There is another code shown as STEP 3. You can use this code to place where you want to add Facebook share button to your website.

You can add it to the sidebar, footer, or anywhere you want.

If you want to show the number of shares then an IFrame code is also there. Just copy and paste that code after adding the Javascript code anywhere to you want.

I hope Now You Can Easily Add Facebook Share Button To Your Site

Facebook can bring more visitors to your blog. The more share you get, the more people would come across your blog.

Adding the share button always works. You can enhance your social engagement with many people. Connect with the people who share. Facebook can help you to build your social brand.

The above method can be followed to add Facebook share button with the clean code.

by Ravi Chahar

A WordPress Professional and the LinkedIn Influencer. A coder by passion and a blogger by choice. WordPress theme development is his forte. He is your WordPress guy who will teach you how to solve WordPress errors, WordPress security issues, design issues and what not.

Get Free Updates Into Your Inbox

Learn Everything Just Like I Did

SUBSCRIBE

6 comments

  1. Hey Ravi,

    Facebook Share Button encourage visitors on our site to share products or content that they like or think others would like with the Facebook share button. We can customize where the Facebook Share button shows up on our site and it’s smart enough to show for visitors who primarily engage with Facebook.

    We know very well to add the Share Button to our website, Facebook requires that our domain have an App ID which it known a unique identifier for our site that ensures that we have the right level of security in place between the user and our website. Eventually, again thanks for sharing much interesting and informative thought with us.

    With best wishes,

    Amar kumar

    1. Hey Amar,

      Facebook have been in the field of social networks for years now. People like to share the content on Facebook. It’s important to have the sharing button to your website.

      You can get more exposure to your blog posts. Every time you generate the share button, Facebook checks the URL you add.
      Thanks for sharing your thoughts.
      Have a wonderful day.
      ~Ravi

  2. Hi Ravi,

    Very nice and simple instructions. I always find the Facebook Developer site to be confusing, especially for non-developers. Wish they made it easy for novices. ?

    Thanks for the guidance.

    1. Hey Neena,

      Facebook provides the direct solution which can be confusing to many. They’re not relly good with elaborating. For a non-developer, it should be done step by step.
      Adding a share button can be helpful in case you don’t want to use a plugin.
      Thanks for stopping by.
      ~Ravi

  3. Hi Ravi,

    Great tips on how to add Facebook share buttons on WordPress. Social media play an essential part in digital marketing, so having a share button on your website is a great way to boost traffic and engagement.

    It makes easier for your readers to share you posts. And the fact that one can easily customize the buttons is amazing.

    Thanks for sharing!

  4. Hi Ravi, I agree – anytime you don’t have to use a plugin is a plus for a WordPress site. Do you recommend this in addition to your social share buttons?
    I could see using in a post about Facebook – like my click to tweets feature.
    Thanks for bringing this to our attention and providing a simple solution!

Leave a Reply

Your email address will not be published. Required fields are marked *