Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.
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:

Comments

Sign In or Register to comment.