HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Please upgrade here. These earlier versions are no longer being updated and have security issues.

Facebook Like Button

edited April 2012 in Vanilla 2.0 - 2.8

Hello,

I'd like to put fb like button at all pages before content with pocket plugin. But I don't know where to put the Javascript SDK.

  1. Include the JavaScript SDK on your page once, ideally right after the opening 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 = "//connect.facebook.net/en_GB/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>

  1. Place the code for your plugin wherever you want the plugin to appear on your page.

<div class="fb-like" data-href="http://forum.caricyber.com" data-send="true" data-width="450" data-show-faces="true"></div>

Help me! Thank you.

Tagged:

Answers

Sign In or Register to comment.