Created
February 28, 2017 16:35
-
-
Save carasmo/0c861b89d696c385b8257c074760343f to your computer and use it in GitHub Desktop.
Non blocking asynchronous Facebook Like box
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
Remove the FB like box script from your header and modify the following for your use. | |
Then place it in your html (like a widget area) where you want it to appear. | |
--> | |
<!-- begin facebook likebox change yourfacebookpage (3 locations) and Your Facebook Page Title --> | |
<div | |
class="fb-page" | |
data-href="https://www.facebook.com/yourfacebookpage" | |
data-tabs="timeline" | |
data-small-header="true" | |
data-adapt-container-width="true" | |
data-hide-cover="true" data-show-facepile="false" | |
> | |
<blockquote cite="https://www.facebook.com/yourfacebookpage" class="fb-xfbml-parse-ignore"> | |
<a href="https://www.facebook.com/yourfacebookpage"> | |
Your Facebook Page Title | |
</a> | |
</blockquote> | |
</div> | |
<div id="fb-root"></div> | |
<script>(function(d, s, id) { | |
var js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) return; | |
js = d.createElement(s); js.id = id; | |
//notice the js.asynch=true; | |
js.async=true; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk'));</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment