Did anyone succeed adding "Like" button?


1

I saw the new Facebook "Like" button on many site and noticed that some of them did not work properly. Today I decided to give it a whirl and alas, can't seem to get it to work on my site. Continue to get the following error:

You must specify an URL as part of this widget or API. I searched the web and it appears that I'm not a lone in getting this marvel of technology to perform.

Anyone had luck with getting it to work?

Facebook

asked Jun 2 '10 at 01:11
Blank
Usabilitest
1,698 points
  • A work around poor Facebook code support: add 'Like' button as an option when you use addThis.com tools. – Usabilitest 14 years ago

1 Answer


3

You'll want to integrate your Like button something like this...

Note the src attribute of the iframe tag below. You'll set the href query parameter to the encoded URL of the page you want to register as "liked" when the user clicks the Like button. In this example, the URL is http://www.mysite.com/page, so the encoded URL is http%3A%2F%2Fwww.mysite.com%2Fpage

<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.mysite.com%2Fpage&layout=standard&show_faces=true&width=360&action=like&font=lucida+grande&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true"></iframe> 

In addition, if you want to customize how the item shows up in the user's Facebook feed, you'll want to add two meta tags to the head tag of your page.

<meta property="og:title" name="og:title" content="Name of the page" /> 

<meta property="og:site_name" name="og:site_name" content="Name of the site" />
answered Jun 2 '10 at 03:04
Blank
Michael
158 points

Your Answer

  • Bold
  • Italic
  • • Bullets
  • 1. Numbers
  • Quote
Not the answer you're looking for? Ask your own question or browse other questions in these topics:

Facebook