0
votes

My requirement is I need to get like button of facebook in my application for each feed of facebook in a user's wall.

In click of like button, I should update the number of likes in facebook as well as in my application for a particular post. I am using below code but unable to achieve my requirement.

    <html xmlns:fb="http://ogp.me/ns/fb#">
    <body>
    <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&appId=297457613664288";
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>
  //div class I am using
    <div class="fb-like" data-send="false" data-width="450" data-show-faces="true"></div>
    </body>
    </html>
1

1 Answers

0
votes

i this this should works:

<iframe src="http://www.facebook.com/plugins/like.php?href=Your App URL"
    scrolling="no" frameborder="0"
    style="border:none; width:450px; height:80px"></iframe>