× Joomla Facebook Connect support forum

Topic-icon "Connect Account" button

Active Subscriptions:

None
11 years 7 months ago #26783 by nicactiv
Hello.
I have a problem... I need to connect registered and athorized joomla-user with FB by JFBC (or SCLogin), but I cant find how to do it without logging out that user.
I found a topic ( "Show Connect Account Button(s)" option from SCLogin module. ) about this problem but cant post in it, so I started my own...

Does anybody know how to solve this problem?
The topic has been locked.
Support Specialist
11 years 7 months ago #26802 by alzander
Replied by alzander on topic "Connect Account" button
In the SCLogin module, there is an option for "Show Connect Account Button(s)". If you enable that, when the user is logged into Joomla and hasn't already linked that account to a Facebook account, it will show the Login with Facebook button. If the user clicks that and logs in, it will link their account for them and let them login with either account when they return.

If that's not what you were looking for, just let us know!

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

None
11 years 7 months ago #26814 by nicactiv
Replied by nicactiv on topic "Connect Account" button
I enabled that option. But I cant see that button. May be thats because Joomla opens custom template after authorization? How can I specify where to show that magic button?))
The topic has been locked.
Support Specialist
11 years 7 months ago #26823 by alzander
Replied by alzander on topic "Connect Account" button
It's part of the SCLogin module. So, if you configure the SCLogin module to show anywhere in the new template and have that option configured, the connect button should show.

You don't need to show the same SCLogin module for it to work either, any instance of the SCLogin module will check if it should show the button and do so if the user hasn't already connected their accounts.

If you aren't seeing it, can you check in the JFBConnect - User Map area to see if your Joomla user is already associated with a Facebook account on your site? If so, the Connect Account button won't show. You can delete the row from the User Map area if you want to test and re-connect the account to Facebook.

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

None
11 years 7 months ago #26924 by nicactiv
Replied by nicactiv on topic "Connect Account" button
I'm sorry, but I can't make it work. (((

My code in tmpl is:
---PHP---
jimport('joomla.application.module.helper');
$mod_sclogin = JModuleHelper::getModule('mod_sclogin');
echo JModuleHelper::renderModule($mod_sclogin);
---/PHP---
---HTML---
123123
{JFBCLogin size=xlarge}
{JFBCRequest request_id=1 link_text=Invite Friends site= link_target=_blank}
---/HTML---

I've removed all rows from jos_jfbconnect_user_map table.
When I'm not authorized, system shows two "login with facebook" buttons, but when I'm authorized it shows none.

SCLogin module configuration and results are in attachments...
File Attachment:

File Attachment:

File Attachment:
The topic has been locked.
Support Specialist
11 years 7 months ago #26943 by alzander
Replied by alzander on topic "Connect Account" button
From your pictures above, the user simply doesn't look to be logged in already. When you use the {JFBCLogin} tag, it will automatically hide itself if a user is logged into Joomla. Only the SCLogin module will show the "Connect this Account?" text with the Login button. You can test out how it should work on our demo page below:
demo.sourcecoast.com/index.php?option=co...cle&id=11&Itemid=175
First, create a normal Joomla account. Login with that account, and then go back to the same page. Since you are logged into Joomla, but that account hasn't been linked to Facebook, you'll see the "Connect Account" text.

To do so on your site, you'd need to instantiate the SCLogin module, configure it how you want, and then display that when the user is already logged in. From your example above, you seem to be creating the SCLogin module right (though you'll need to make sure you are fetching the right instance with that code). However, the user doesn't look to be logged into Joomla.

If they are logged into Joomla, then something else odd is going on. Can you post or Private Message the URL of the page we can see the SCLogin module configured on?

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

None
11 years 7 months ago #27095 by nicactiv
Replied by nicactiv on topic "Connect Account" button
I found the decision!
$mod_sclogin = JModuleHelper::getModule('mod_sclogin');
$mod_sclogin->params = "showConnectButton=1\n";
echo JModuleHelper::renderModule($mod_sclogin);

It's not ideal, but works.
The topic has been locked.
Support Specialist
11 years 7 months ago #27100 by alzander
Replied by alzander on topic "Connect Account" button
No, not ideal, but glad it works. When you use code to load modules instead of the built-in Joomla templating system, odd things can happen. I'm not sure the proper way to load a module instance's parameters, but if you figure that out, then you can make all the settings in the module itself and not have to use overrides.

Either way, if you're up and running that's what matters!

Thanks, and good luck,
Alex
The topic has been locked.