Topic-icon Facebook Button not working

Active Subscriptions:

None
9 years 7 months ago #47209 by bumpeboy
Hi,

1. I had installed this module on my test site and it was working fine. I have now created a new directory (NEWS) and have applied the same settings as the test site but on the new site the button FACEBOOK is not working, its not clickable.

I have tried to read through this forum and the only solution that worked before was to ensure the Load jQuery/Bootstrap is active. I have checked its active but am still having the problem.

I have tried to create a new API with the new directory but still it doesn't work.

Please help. You have my login details from a previous pm. The directory in question is NEWS.


Many thanks
File Attachment:
The topic has been locked.
Support Specialist
9 years 7 months ago #47215 by alzander
Please re-run the Autotune -> Error Check tool on your site. Test 2 is failing for me:

Test: Facebook Javascript library inclusion
Fail: Another Facebook extension is installed, including the Facebook Javascript library, and may conflict.

Both your template and a "Find us on Facebook" module are including the older Facebook Javascript library which will prevent JFBConnect, which is using the latest version of the Javascript library, from working. You'll need to disable the older Javascript inclusions to get things working.

I hope that helps,
Alex
The topic has been locked.
Active Subscriptions:

None
9 years 6 months ago - 9 years 6 months ago #48440 by bumpeboy
Hi Alex,
Thanks for your reply. Its taking ages to get this module to work and now my subscription will end before i have used the module.

I have tried my best but am get the following error.
Test: Facebook Javascript library inclusion
Fail: Another Facebook extension is installed, including the Facebook Javascript library, and may conflict.
Is that the error that you are referring to?

This is what i have attempted to do to make it work but all was in vain.

1) I have gone to the template and deactivated
2) Searched facebook on extensions and unpublished whatever i found out.

Still the login does not work.

Please assist me by pointing to me anything specific that will help to make this work.


File Attachment:


File Attachment:




Many thanks
Last edit: 9 years 6 months ago by bumpeboy.
The topic has been locked.
Support Specialist
9 years 6 months ago #48456 by mel
Replied by mel on topic Facebook Button not working
Yes, that is the error Alex was referring to.

Depending on the other extensions that you have installed on your page (not just anything with the name Facebook in it), you may need to look at the configuration options for each of those components and disable and Facebook options within those components.

Your page still has the older all.js Facebook javascript file, which will conflict. If you look at the source of the page, the following outdated script is still being inserted and needs to be removed. All else fails, you can search on your server for this code to see what's inserting it.
<script type="text/javascript">

//<![CDATA[
   	window.fbAsyncInit = function() {
		FB.init({ appId: '', 
			status: true, 
			cookie: true,
			xfbml: true,
			oauth: true
		});
   		    
	  		  	function updateButton(response) {
	    	var button = document.getElementById('fb-auth');
		
			if(button) {   
			    if (response.authResponse) {
			    // user is already logged in and connected
			    button.onclick = function() {
			        if(jQuery('#login-form').length > 0){
			            jQuery('#modlgn-username').val('Facebook');
			            jQuery('#modlgn-passwd').val('Facebook');
			            jQuery('#login-form').submit();
			        } else if(jQuery('com-login-form').length > 0) {
			           jQuery('#username').val('Facebook');
			           jQuery('#password').val('Facebook');
			           jQuery('#com-login-form').submit();
			        }
			    }
			} else {
			    //user is not connected to your app or logged out
			    button.onclick = function() {
			        FB.login(function(response) {
			           if (response.authResponse) {
			              if(jQuery('#login-form').length > 0){
			                jQuery('#modlgn-username').val('Facebook');
			                jQuery('#modlgn-passwd').val('Facebook');
			                jQuery('#login-form').submit();
			              } else if(jQuery('#com-login-form').length > 0) {
			                 jQuery('#username').val('Facebook');
			                 jQuery('#password').val('Facebook');
			                 jQuery('#com-login-form').submit();
			              }
			          } else {
			            //user cancelled login or did not grant authorization
			          }
			        }, {scope:'email'});   
			    }
	    	}
	    }
	  }
	  // run once with current status and whenever the status changes
	  FB.getLoginStatus(updateButton);
	  FB.Event.subscribe('auth.statusChange', updateButton);	
	  	};
    //      
    jQuery(window).load(function() {
    	(function(){
    		if(!document.getElementById('fb-root')) {
    			var root = document.createElement('div');
    			root.id = 'fb-root';
    			document.getElementById('gkfb-root').appendChild(root);
    			var e = document.createElement('script');
    			e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
    			e.async = true;
    			document.getElementById('fb-root').appendChild(e);
    		}  
    	}());
    });
    //]]>
</script>
The topic has been locked.
Active Subscriptions:

None
9 years 6 months ago #48590 by bumpeboy
Hi thanks for the reply.

I have tried but i could not locate the code that posted.

I downloaded my entire site and using the dreamweaver i searched for the code in the site folder but i got zero results.

Do you have an idea where this code could be on my site?

Many Thanks
The topic has been locked.
Support Specialist
9 years 6 months ago #48626 by mel
Replied by mel on topic Facebook Button not working
I don't know if you received my PM, but please send me the credentials if you want help investigating this further.
The topic has been locked.