Hello Guys!
This tutorial is about plugins of facebook. As we all know that facebook have made us soo easy to use its share,like button and coment plugin etc for developer.
Any one can use this by copying soo easily bt its some tricky too use it dynamically.
Today, in this tutorial , i am going to show you how I have used it dynamically.
First go to this website of facebook for developer to use its plugins and like button , share,send etc.facebook for developer.
Now, just grab the codes from there of coment,share , like plugins and paste it where to in your website.
I have used it like this giving link on 9,12 line as like this using link id "http://onlinestudy.bramento.com/pages/detail.php?post_id=<?php echo($row['post_id']); ?>
- <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/sdk.js#xfbml=1&version=v2.8";
- fjs.parentNode.insertBefore(js, fjs);
- }(document, 'script', 'facebook-jssdk'));</script>
- <div class="fb-like" data-href="http://onlinestudy.bramento.com/pages/detail.php?post_id=<?php echo($row['post_id']); ?>" data-layout="button_count" data-action="like" data-size="large" data-show-faces="true"></div> <div class="fb-send" data-href="http://onlinestudy.bramento.com/pages/detail.php?post_id=<?php echo($row['post_id']); ?>"></div>
- <br />
- <div class="fb-comments" data-href="http://onlinestudy.bramento.com/pages/detail.php?post_id=<?php echo($row['post_id']); ?>" data-numposts="5"></div>
No comments:
Post a Comment