0

I want to add a facebook-fanbox on a wordpress-page. I can go about this in the following matter:

I take the test from the facebook-developer site.

Initialize the JavaScript SDK using this app: books-page...

 <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_GB/sdk.js#xfbml=1&appId=473241986032774&version=v2.0";
 fjs.parentNode.insertBefore(js, fjs); }(document, 'script',
 'facebook-jssdk'));</script>

Include the JavaScript SDK on your page once, ideally right after the opening <body> tag.

Or do I need to include this?

 <div class="fb-like-box"
 data-href="https://www.facebook.com/FacebookDevelopers" 
 data-colorscheme="light" data-show-faces="true" data-header="true"
 data-stream="false" data-show-border="true"></div>

Which text has to be added into a text-block widget? Any suggestions

0

You will need to include both pieces of code in the text widget like this. BTW, When you pasted your code, you missed a > in </script>. I fixed it in my edit and answer

<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_GB/sdk.js#xfbml=1&appId=473241986032774&version=v2.0";
 fjs.parentNode.insertBefore(js, fjs); }(document, 'script',
 'facebook-jssdk'));</script>

<div class="fb-like-box"
 data-href="https://www.facebook.com/FacebookDevelopers" 
 data-colorscheme="light" data-show-faces="true" data-header="true"
 data-stream="false" data-show-border="true"></div>
|improve this answer|||||
  • My pleasure, glad I could help :-) – Pieter Goosen Jun 9 '14 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.