Facebook fan page box

Support forum dedicated to GameNews game Joomla template perfect for gamers, game portal news and reviews with dedicated extensions for rating and video support
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Tue Jul 09, 2013 5:27 pm
Reply with quote
Report this post
Hello

I'm using GameNews template (www.snaifriends.it) but I can't get a fanpage box working.

I've been using fanpage box so many times for so many different sites, but with GameNews whatever module I install I can only get the module name header "follow on facebook"; under the header no fan picture, no stream, nothing...

I installed several different modules (Nurte, ITP, TheOnDV), so maybe it does not depend on the module itself, but on the template(?). I used the same modules on other sites and they correctly work. I double checked the FB module configurations without solving.

I got the twitter module working, but the facebook one not. Is there any issue with the template?

If you go on the site link (still working in progress) you will see the header of the module without anything below it.

I could provide you the admin access if needed.

Thanks
User avatar
Expert Boarder

teitbite
Wed Jul 10, 2013 2:40 am
Reply with quote
Report this post
Hi

This may be a conflict with a template facebook code. Please just for test remove all facebook code from /layout/block/social.php if this will not change anything than restore this file and send me an access to joomla panel.
User avatar
Moderator

GK User
Wed Jul 10, 2013 8:40 am
Reply with quote
Report this post
Hello I removed from the file you stated the following code:

Code: Select all
//<![CDATA[
      window.fbAsyncInit = function() {
      FB.init({ appId: '<?php echo $this->API->get('fb_api_id', ''); ?>',
         status: true,
         cookie: true,
         xfbml: true,
         oauth: true
      });
            
        <?php if($this->API->get('fb_login', '0') == 1) : ?>
        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($('login-form')){
                  $('modlgn-username').set('value','Facebook');
                  $('modlgn-passwd').set('value','Facebook');
                  $('login-form').submit();
               } else if($$('.login form')[0]) {
                  $('username').set('value','Facebook');
                  $('password').set('value','Facebook');
                  $$('.login form')[0].submit();
               }
            }
         } else {
               //user is not connected to your app or logged out
               button.onclick = function() {
               FB.login(function(response) {
                  if (response.authResponse) {
                     if($('login-form')){
                        $('modlgn-username').set('value','Facebook');
                        $('modlgn-passwd').set('value','Facebook');
                        $('login-form').submit();
                     } else if($$('.login form')[0]) {
                        $('username').set('value','Facebook');
                        $('password').set('value','Facebook');
                        $$('.login form')[0].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);   
     <?php endif; ?>
   };
    //     
   window.addEvent('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/<?php echo $this->API->get('fb_lang', 'en_US'); ?>/all.js';
                     e.async = true;
                 document.getElementById('fb-root').appendChild(e);   
                }
        }());
    });
    //]]>


but the result is the same (even after emptying the cache): no facebook fanbox shown (only the header title).

I restored the original social.php file.

I sent you by PM the admin access.

Thanks! :-)
User avatar
Expert Boarder

GK User
Wed Jul 10, 2013 9:00 am
Reply with quote
Report this post
Uhm... I think I sent you the PM... it's still in outobox and I don't know how can I send it...
User avatar
Expert Boarder

teitbite
Wed Jul 10, 2013 7:59 pm
Reply with quote
Report this post
Hi

I was going to look into this now, but I can see a module working fine. Have You fixed that ?
User avatar
Moderator

GK User
Thu Jul 11, 2013 8:46 am
Reply with quote
Report this post
Hello,

no I did not fix it... but I still can't see it both from Chrome, FFox, IE and from different OS (Linux/WinXP/7/iOS). Please see the screenshot attached.

I did see once the fax box as well, but only once and I can't figure out why only that time; then it disappeared...

Maybe if you come back there you will not see it anymore...

I installed 3 different modules and the result is the same... I also tried to display another fanpage (that works fine elsewhere) without seeing it.

Thanks for your assistance :-)
User avatar
Expert Boarder

teitbite
Fri Jul 12, 2013 4:02 am
Reply with quote
Report this post
Hi

Ok. Now I do not see it as well. But fb code is in place. The problem is that it has heigh equal 0px. There is also an error in console: "fb:fan failed to resize in 45s".

Fb code is still using an attrinute which has been removed some time ago. So I think some plugin is overwriteing it and adding this faulty code to it. Please send me an access to joomla panel. I'll try unpublish couple of modules/plugins to see which one can be causing it.
User avatar
Moderator

teitbite
Sun Jul 14, 2013 2:09 am
Reply with quote
Report this post
Hi

Sorry for asking for access again. I'm receiving dozen of accesses everyday so lost track of it easily :(

I can see it's a conflict. When I have disabled the "'Like' buttons in the articles" in template settings module shows. I would advice to leave it like that and add a facebook button manually with a code from facebook like box generator: https://developers.facebook.com/docs/re ... gins/like/

To do that You will need to edit /html/com_content/article.php if You are using regular joomla articles. If You are using K2 only than button will load from K2 scripts, so no additional work required.
User avatar
Moderator

GK User
Mon Jul 15, 2013 9:09 am
Reply with quote
Report this post
Hello,

thanks for your answer.

But I still can't see the module; I saw you disabled FB like... but I can't see the module... I disabled also everything else in "social API" from template setting (twitter, G+, pinterest), but the module does not appear as well...

Thanks for your help...
User avatar
Expert Boarder

teitbite
Tue Jul 16, 2013 3:29 am
Reply with quote
Report this post
Hi

That's odd, becuase I can still see this module present. I think it way be becuase the code is not loaded in full ;/ I'm afraid You will have to ask facebook developers, I'm sure they have seen such problem before. I've eliminated all possible issues and was sue it worked becuase I was ablr to see this module. If You are telling me that it's still not visible for You, than this means that it's not happening all the time. Sorry, but I'm not able to locate what can be causing this.
User avatar
Moderator

GK User
Wed Jul 17, 2013 1:13 pm
Reply with quote
Report this post
Hello,

thanks for you answer...

That's how i solved (maybe could helpful for someone):

1) I created a fanbox getting the code directly from Facebook (https://developers.facebook.com/docs/re ... /like-box/)

2) I created a HTML module putting inside both codes facebook provides.

3) At this point (magically) I got the previous (not working) module working

4) I unpublished the HTML module

5) Now I have a working FB module

Thanks
User avatar
Expert Boarder

teitbite
Fri Jul 19, 2013 11:43 pm
Reply with quote
Report this post
Hi

Ok. But it's just impossible :) When You have disabed the new module than You should get back to the previous state. This may mean that the fact that I was able to see this module for most of the time was becuase it was a cache or connection to fb problem. It's really hard to tell.Maybe if I'll have an access to Your computer I will be able to notice the problem.
User avatar
Moderator

GK User
Wed Jul 24, 2013 3:11 pm
Reply with quote
Report this post
Ok now it's clear the reason why this module has so strange behaviour.

The facebook page is set for people >18 years, so I could see the module only when I'm logged; if I'm not the module is blank.

It was so simple and I was so stupid not realizing before... I did not relate being logged with the visibilty of the module...

Hope this could help as well :-)
User avatar
Expert Boarder

teitbite
Fri Jul 26, 2013 1:06 am
Reply with quote
Report this post
Hi

How? Ok. I have no idea how to attach a module to ppl age :) I think You mean groups. That would explain why I could see it and You don't and I was looking for a code issue not settings :) Ok. I'm glad it's working now.
User avatar
Moderator

GK User
Fri Jul 26, 2013 9:15 am
Reply with quote
Report this post
Hello,

it was not the module set to people>18, but only the facebook page, that is accessibile only to>18.

In fact if you are not FB logged and type www.facebook.com/snaifriends you can't see the anything of the page because it's set to >18.

I did not related earlier the two things...

Sorry for bothering you for such a stupid question NOT depending on the template :-)
User avatar
Expert Boarder

teitbite
Sun Jul 28, 2013 2:36 am
Reply with quote
Report this post
Hi

Anyway I thank You. I had no idea it can be done like that. So I've learned something new :)
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.