Wednesday 20 March 2013

Create FaceBook Like button in my application

This article give highly proper code
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 = "//connect.facebook.net/en_US/all.js#xfbml=1";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>


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

<div class="fb-like" data-send="true" data-width="450" data-show-faces="true"></div>


No comments:

Post a Comment

If any doubt?then please comment in my post

How to reduce angular CLI build time

 Index: ----- I am using angular cli - 7 and I am going to tell how to reduce the build time as per my knowledge. Problem: -------- Now the ...