add Facebook javascript sdk to website

Support Area Forums Foxy add Facebook javascript sdk to website

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
URL to the page in question: http://pub340.ca
  • Author
    Posts
  • #22832
    Kais
    Participant

    I am wanting to connect the website to the clients facebook page using the method described on this page https://developers.facebook.com/quickstarts

    According to the info on this page, I need to insert a javascript snippet just after the opening body tag

    Something like this

    <script>
    window.fbAsyncInit = function() {
    FB.init({
    appId : ‘**************’,
    xfbml : true,
    version : ‘v2.1’
    });
    };

    (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”;
    fjs.parentNode.insertBefore(js, fjs);
    }(document, ‘script’, ‘facebook-jssdk’));
    </script>

    Do you know of a plugin that does this?
    I have look, but my research is inconclusive

    This was the most likely – but no
    https://developers.facebook.com/docs/wordpress

    I also have installed this plug in
    Facebook Open Graph Meta Tags for WordPress

    and WordPress SEO by Yoast.

    My last alternative is to edit the header.php file in the child theme, which would be easier in many ways that a plugin.

    Do you have any suggestions / experience in making a webpage a facebook app?

    Thanks

    #22833
    Bill Robbins
    Moderator

    It’s not something I’ve done lately. Back when you could customize the landing page of smaller Facebook pages, I used to include a template in my themes to create that page for you. When they restricted that to pages with over 100k likes, I stopped.

    I’d just add it in the header.php file in the child theme if I were you. That’ll be easier.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘add Facebook javascript sdk to website’ is closed to new replies.