Conflict with JFBConnect

  • Your avatar
     2 years ago

    Recently I purchased JFB Connect for my site so that customers can login via social media profiles.  I noticed that the application as not working perfectly, so I contacted JFB Connect for support.  They have indicated that the most likely conflict is with AWO Rewards, and they have suggested I contact you for possible support.  

    What they have deciphered is:

    "The problem is that you're page is loading the very old Facebook Javascript library, and that's causing a conflict with the newer Facebook Javascript library and the login process. You'll need to remove the following code from the page HTML:"

    function (d, s, id) { 
                var js, fjs = d.getElementsByTagName(s)[0]; 
                if (d.getElementById(id)) { return; } 
                js = d.createElement(s); = id; 
                js.src = "//"; 
                fjs.parentNode.insertBefore(js, fjs); 
            } (document, "script", "facebook-jssdk")); 
            window.fbAsyncInit = function () { 
                    appId: "", 
                    status: true, // Check login status. 
                    cookie: true, // Enable cookies to allow the server to access the session. 
                    xfbml: true  // Parse XFBML. 
                FB.Event.subscribe("edge.create", function (response,elem) { 
                    widget_id =; 
                    if(widget_id!=undefined) { 
                        item_id = widget_id.substr(15); 
                        document.getElementById("fb_like_"+item_id).innerHTML = "<img src='/media/com_aworewards/images/loading.gif' />"; 
                    //alert("You liked the URL: " + response); 
    They have also pointed me toward the following articles to justify their opinion.For more details, see: 
    Facebook's quickstart guide which specifically calls out the sdk.js file: … quickstart 

    Another guide from Facebook specifically saying not to use all.js: … /angularjs 

    And, of course, the obligatory Stack Overflow post: … and-sdk-js 
    My questions to you are....1) What would be the challenge with removing that code from the AWO Rewards file? 

  • Your avatar
     2 years ago


    In the code above, which is in 2 files:

    Please change these:

             js.src = "//'.$this->params->get('social_facebook_key').'";

             js.src = "//";

    And after this:
                    appId: "'.$this->params->get('social_facebook_key').'",
                    status: true, // Check login status.
                    cookie: true, // Enable cookies to allow the server to access the session.
                    xfbml: true  // Parse XFBML.

    Add this
                 ,version: "v2.8"

    That should fix the issue.