facebook - Adding a Like button for an existing FB Page -


this seems should simple enough, i've gotten burned messing fb buttons in past. want verification here before dive in , lose likes.

i have webpage. have facebook page webpage amount of likes. want add button web page upon clicking, likes facebook page.

do put in http://www.facebook.com/myfacebookpage in "url like" of generator , fb page?

i know it's simple - want sanity check! i've lost amount of likes improperly implementing in past. thanks!

that's should do.

if use iframe version it's have do.

if use xfbml version should initialize javascript sdk: https://developers.facebook.com/docs/reference/javascript/

something this:

<div id="fb-root"></div> <script>     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);     }()); </script> 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -