This Article is About
facebook
search field
news feed
point of view
marketing
traffic
How To Add The Facebook “like This” Button To Your Website
Join 1000's of Authors at StreetArticles Today!

How to Add the Facebook “like This” Button to Your Website

Adding a “Like This” button to a page or pages on your website is not a complicated process. There are two different methods for adding one. The older “iframe” and the newer “javascript”. The javascript method is better although more complicated, so unless you have a specific need for the iframe option I suggest you use it. For the purposes of this article I will focus on the javascript method.

Why should you do this?

With the “Like This” button users can comment on your website or page. They can share the page with those that share their Facebook profile. Provided they are already logged into Facebook, all they need to do is click the button, enter a comment and by clicking one more button post to Facebook.

Once posted the comment will appear in the user’s News Feed including a link back to your site. This is great from a marketing point of view and helpful in the process of building traffic to your website.

A “Like This” button can apply to an entire site, a single page or you can have multiple buttons on a page each relating to a specific item. That item could be a product, service or something else. What I am describing here is how to add a single button to a page or website (repeat the same on as many pages as you require).

Where do I start?

Before you start there is one vital piece of information which you require beforehand. This is your facebook id or facebook page admin id.

Login to your facebook account. At the very top of the page, next to the Facebook search field is your name, click on it. The page will change. Look at the URL showing for the page in your browser and it will show id= followed by a long number. That is your facebook id.

If you want your facebook admin id, login to facebook and select the relevant page. Then select “Edit Page” and then “Admin roles” from the menu. The admin id is visible in the URL showing in your browser.

“Like This” button basic components

The “Like This” button is specified on the page using a div statement. Several items are required. I suggest you specify them in the following order

  1. Start with div tag
  2. class=’fb-like’ This tells facebook that this is a “Like This” button.
  3. data-href= This must be followed by the URL. The URL is the full path to your page. Do not just use your domain, you should include the actual page even if it is the default “index”.
  4. data-send= Because we are using the javascript method your “Like This” button can have the additional “Send” button. Send if selected enables a visitor to send the page url to a friend by email. This is controlled by the “data-send=true” setting, “true” if you want this otherwise “false”.
  5. data-width= The button(s) will occupy space on your page. You can control this using the “data-width=450” setting. 300 - 450 is a good range to use.
  6. data-show-faces= Set to false if you do not want to show the faces of those which have liked this page or true if you do.
  7. data-font= Set to your required font, the default is arial.
  8. End with /div tag

Other options are available. These can be found on Facebook, in the developer section.

You also need to add a small piece of javascript code to your page. This is added to the main body of your page. I suggest immediately after the body tag.

You can get the javascript code from the developer section of Facebook. Search for "Like This button".

Adding a “Like This” button should be a two stage process. Ideally you should also add Facebook Open Graph settings too. This will be covered in a separate article later but more information can be found in the developer section of Facebook.


Street Talk

Hey, Thanks for the tip. I have been trying to figure this out

Reply
  about 6 years ago

I could have provided more useful information, but unfortunately the rules of the site are too restrictive.

Reply
  about 6 years ago

That is so true. But at least you pointed me in the right direction

  
  about 6 years ago
You May Also Like
How to Use Facebook In China
I know, for Westerner in China not being able to access your Facebook account basically cripples your ability to keep in touch with the outside world. I personally think this has some very interesting implications about how western social networking is taking over our ways of communication - but that's…
By: Rodders Gillam in  News and Society  >  International   Apr 08, 2012  
3
  Likes: 53

No Facebook In China
As a warning to all Facebook members (is there anyone who doesn't have a Facebook account?) that are coming to China - there is no Facebook in China. It's strange for me to think that there is still a world out there that has free access to Facebook. I've been…
By: Rodders Gillam in  News and Society  >  International   May 24, 2011  
0
  Likes: 1

Your Trove Stealing Facebook From Itself
Earlier this week, the Social Media titan, Facebook announced Graph Search (the Beta version). The update is an extension to the search option on the portal. Currently, we are open to search only the likes, photos, and limited data. But, this option views to enhance our search experience with an…
By: intelgain34 in  Computers and Technology  >  Personal Tech   Jan 28, 2013  
0
  Likes: 0

Access Facebook In Vietnam on Mac
Being able to access Facebook in Vietnam on Mac is really no different than other computer operating systems. In the past, Macs and Windows PCs were a lot more different than today. By different, I mean that it was a major pain to get anything for Mac. Tech support, games,…
By: Rodders Gillam in  News and Society  >  International   Apr 08, 2012  
0
  Likes: 1

Proxy for Facebook In China
As a promoter for various proxies for Facebook in China, I've seen a lot of statistics over the years about who signs up for these types of services. One thing that might surprise you, is that the majority of people signing up for a proxy for Facebook in China are…
By: Rodders Gillam in  Computers and Technology   Apr 11, 2012  
0
  Likes: 5

Should You Delete Your Ex On Facebook After The Break Up?
The Ins And Outs Of Remaining Friends With Your Ex On Facebook When the relationship concludes, a question you may be asking yourself is what should your next step be. Should you delete your ex on Facebook? You may be asking yourself if you should completely cut your ex off…
By: Isabella Rose in  Relationships  >  Reconnecting   Aug 31, 2012  
0
  Likes: 5

Should I Delete Him From Facebook After The Breakup?
Breakups used to be a lot simpler than they are today. Although the process has always been heartbreaking and difficult to cope with, the advances in social media sites like Facebook have made breaking up even harder to process. It's harder than ever to just leave your ex behind you.…
By: Charlotte Jane in  Relationships  >  Conflict   Jul 26, 2012  
0
  Likes: 0

Get on Facebook In China And Grow Your Business
As a business owner I know how important it is to get on Facebook in China. Facebook, and social networking in general hasn't quite had the same effect on the Internet and businesses IRL. Business in China is still very much a "family and friends" deal, and advertising is very…
0
  Likes: 0

Deleting Your Ex On Facebook After The Break Up - Should I?
When you first break up with someone, it is normal to be completely confused about where to turn, what to say and how to act. This is compounded by the fact that you have to work out the many intricacies of Facebook too. What do you do? Should you delete…
By: Charlotte Jane in  Relationships  >  Conflict   Aug 30, 2012  
0
  Likes: 4

Access Facebook In Vietnam
With an updated Internet restriction policy in Vietnam, the demand to access Facebook in Vietnam has grown exponentially in the last few month. In previous years, the Facebook blocked in Vietnam was just an annoyance, something that didn't stop you from getting on your Facebook account, but just made it…
By: Rodders Gillam in  News and Society  >  International   Apr 08, 2012  
0
  Likes: 5

Facebook In China
Rumors are starting to fly about Facebook in China, on both Western and Chinese Internet space. However, as an American in China, I find the idea of Facebook in China laughable. Not that kind of "ha ha" funny, but in the kid of way that you laugh at a kid…
By: Rodders Gillam in  News and Society  >  International   Apr 11, 2012  
0
  Likes: 1

How Your Cat, Facebook And Twitter Fit Into the Online World
Cat? Facebook? Not words that you would usually string together in one sentence or phrase not so long ago, but nowadays it is a pretty much accepted that in the online world things have changed and changed in a big way. This revolution in social interaction has resulted in one…
By: Roger B Shann in  Pets  >  Cats   Jul 15, 2011  
7
  Likes: 3

How to Access Facebook In Vietnam
Being able to access Facebook in China is getting to be a bit of an issue these days. Sure there are lots of solutions available on the various blogs and advertising sites, but it's hard to find out what really works. One thing you have to deal with is sifting…
By: Rodders Gillam in  Computers and Technology  >  Personal Tech   Apr 08, 2012  
0
  Likes: 0

Reliving Your History Through the New Facebook Timeline
I am sure by now most of you social networking lovers have heard of the newest change on Facebook coming out in just weeks according to it's founder Mark Zuckerberg, Timeline. In the article above the author mentions the show "This is Your Life." Well unfortunately I am old enough…
By: April Colon in  Internet and Businesses Online  >  Social Networking   Oct 18, 2011  
0
  Likes: 0

Explode Your Facebook Likes In 9 Simple Steps
Do you salivate at the mouth thinking of all the people on Facebook who are so close, yet so beyond your reach? Do you see others with thousands of likes to their fanpage and wish you knew how to get facebook likes too? Over the past couple of days I've…
By: Karri Hull in  Internet and Businesses Online  >  Internet Marketing   May 20, 2012  
0
  Likes: 1

Article Views: 963    Report this Article