How to insert a Facebook Plugin into your web page


This article is written specifically for the Facebook Like button, so the size of the rectangle is the size of the Like Button by default when the widget is added. Similar steps will also work for the other Facebook widgets.

To display your widget when you preview your web page, draw a rectangle that is 450px wide by 25px high.

Then drag drop the Facebook widget into the page from the Designs Gallery and customise the Like button. Click 'Get Code' and copy the contents of the 2nd box containing the code. Click Cancel in the browser window.

Click the rectangle you've drawn and go to Utilities -> Web Properties -> Placeholder tab and click HTML Code (body). Paste the code you've copied here then click OK.

Next, click HTML Code (head) button in the Placeholder tab. Copy the lines of code below and paste it into the dialog box in Web Designer.

<div id="fb-root"></div>

<script>(function(d, s, id) {

  var js, fjs = d.getElementsByTagName(s)[0];

  var fb_host = (("https:" == document.location.protocol) ? "https:" : "http:");

  if (d.getElementById(id)) {return;}

  js = d.createElement(s); = id;

  js.src =  ""+ fb_host + "//";

  fjs.parentNode.insertBefore(js, fjs);

}(document, 'script', 'facebook-jssdk'));</script>


Tick the 'Regenerate placeholder image' option in the Placeholder tab and click OK.

Now preview the page and the Facebook button will display.


This article applies to Web Designer 7 Premium and Designer Pro 7 and later.

If you are using Web Designer 6 or a non-Premium version of Web Designer from version 7 or newer refer to this support article for where to paste the code that goes in the head section of your web page.

(242 vote(s))
Not helpful