Reputation: 31
I want to open facebook like button through ajax fancy box.When I use iframe all images having like button when i click any one like button all images are become like. When I try to use then first time facebook like button show but after that it is not showing.
I use code for iframe
.html&image=&layout=standard&show_faces=true&width=450&action=like&font=arial&colorscheme=light&send=true" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:px">
and for fb like
window.fbAsyncInit = function() { FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); (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')); " layout="button_count" show_faces="false">
Please help me ................
Upvotes: 2
Views: 217
Reputation: 31
I get the solution now it is working but error message show when i like on like button the iframe code is
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode('http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'])?>" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:50px"></iframe>
Upvotes: 1