Add the Facebook JavaScript SDK to WordPress

  • In Progress
    Posted in: Highend WP Theme  
  • Customer
    Mark
    June 17, 2015 at 9:03 pm #44999

    Hi………..

    I want to add Add the Facebook JavaScript SDK to WordPress the facebook javascript SDK to my site. The instruction say:

    Open up your themes single.php or equivalent file and right after the <body> tag add the following:

    <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>

    There is no <body> tag in the single.php file……….

    Thoughts?

    Do any of the social login plugins accomplish this?

    Thanx
    Mark

    Sorry, this forum is for verified users only. Please Login or Register to continue

Comments are closed.