Skip to content

Instantly share code, notes, and snippets.

@thanhcs94
Created April 19, 2018 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thanhcs94/901fe45b9354dc207f9a9fddd5853c49 to your computer and use it in GitHub Desktop.
Save thanhcs94/901fe45b9354dc207f9a9fddd5853c49 to your computer and use it in GitHub Desktop.
Step 1: Include the JavaScript SDK on your page once, ideally right after the opening body tag.
<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;
js.src = 'https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.12&appId=933992986744462&autoLogAppEvents=1';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Step 2: Place this code wherever you want the plugin to appear on your page.
<div class="fb-like" style="position:fixed; bottom: 25px; right: 90px;" data-href="https://giaohangnhanh.vn" data-layout="button_count" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment