How to add your Facebook page to website using Page plugin

The Page plugin lets you easily embed and promote any public Facebook Page on your website. Just like on Facebook, your visitors can like and share the Page without leaving your site. You can use the Page plugin for any Page that is not restricted, for example, by country or age.

Visit website https://developers.facebook.com/docs/plugins/page-plugin on the opened webpage, enter your page URL in “Facebook Page URL” and click “Get Code”

For example, If we enter our facebook page URL https://www.facebook.com/lynxbee1 into “Facebook Page URL” and click “Get Code” we got a code as,

Step 1: Include the JavaScript SDK on your page once, ideally right after the opening body tag.

<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v3.2"></script>

Step 2: Place this code wherever you want the plugin to appear on your page.

<div class="fb-page" data-href="https://www.facebook.com/lynxbee1" data-tabs="timeline" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/lynxbee1" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/lynxbee1">Lynxbee</a></blockquote></div>

You can customise the look of the facebook page box by modifying parameters as mentioned at https://developers.facebook.com/docs/plugins/page-plugin

Follow Lynxbee

Leave a Reply / Ask Question