Topic-icon Auto Login if in FB Canvas - System Plugin

Active Subscriptions:

None
11 years 2 months ago #30608 by Ivan
Alex,

For 1.5 JFBConnect System plugin I had the 2 code below that would execute if on the facebook canvas in plugins/system/jfbcsystem/jfbcsystem.php

below
    if ($this->configModel->getSetting('social_notification_google_analytics'))
            $subs .= "\njfbc.social.googleAnalytics.trackFacebook();";


             $subs .= "FB.Event.subscribe('auth.login', function(response) { 
              if (response.status === 'connected') { 
                   jfbc.login.login_button_click(); 
              } 
            });";


I have enabled this in my plugin but don't see it executing the facebook button click.
The topic has been locked.
Support Specialist
11 years 2 months ago #30615 by alzander
Do you have the 'Auto Login Facebook Users' setting enabled? If not, in the jfbcsystem.php file, search for "status: false" and change that to "status: true" in the same area you are doing that code. That will have the FB Javascript notify JFBConnect when a user is connected and should hopefully help get your code going.

If not, let us know.

Thanks,
Alex
The topic has been locked.
Active Subscriptions:

None
11 years 1 month ago #31823 by Ivan
Alex,

I made the change you requested. However in neither IE nor Firefox does the popup get evoked. Clicking the facebook button just hangs.


I have diabled Autlogin Facebook Users and have the code above. This used to work for 1.5 the connect code would detect and invoke the javascript.

I notice there is some javascript at the bottom: jfbc.login.on_login()
The topic has been locked.
Support Specialist
11 years 1 month ago #31849 by alzander
If there's Javascript at the bottom of the page, it likely means that it's not properly inside of script tags. That's the only reason I can see the code being displayed.

Can you let me know your App Canvas page? I know I've seen it before, but I could find it from a quick search. I'll gladly look to see if I can see anything out of the ordinary in the code.

Thanks,
Alex
The topic has been locked.