Wednesday, December 7, 2011

Facebook Like Button for Google Sites



Facebook as a button allows your site visitors to share content with your friends on Facebook. When a visitor clicks like a button on your site, the story appears in the user's friends' News with a link back to your website. This is a good way to publish your site (but it goes without saying that you must have good content that people actually want ).

If, like me, use the Google Sites / Apps, then you will find that Google HTML editor does not allow you to use Facebook for that. You will see an error message like this:

"HTML either contains unsafe tags (iframe, embed, styles, script) or extra attributes. They will be removed when the page is viewed ."

workaround is to use a gadget called "codec pack", written by a man named Mori, who is the guru of all Google and shares his expertise with others without expecting anything in return.

Here's how to do it.

First, go to Facebook to pick up their official code such as a button. Enter the information requested on the form. Do not forget to include http:// in front of their web addresses, otherwise it will not work. Click the Get Code button and copy the code.

Facebook allows 2 types of code, xfbml or iframe. I discovered that my iPad would not show gadget that uses xfbml code, so I stuck to iframes for your website.

Next go to Google Site:

Select the Edit page for the page you want to insert the Facebook button in.

Place the cursor in the page where you want to insert the button.

from the menu bar click on Insert, and more gadgets.

search box appears. Enter the code wrapper and icons for the gadget pack will appear. Click on this icon, then select it.

Paste the code you have copied from the Facebook page titled Embed Code.

Select the size of the window you want to display. It depends on the type of button that you select. I used 80x20 pixels for "button-count" option.

Make sure the check box to display the title and scroll bars are not indicated.

That's it. After you save the page, the Facebook button appears and works like a dream.

No comments:

Post a Comment