× Joomla Facebook Connect support forum

Topic-icon Facebook Connect not working in popup

Active Subscriptions:

None
15 years 4 months ago #7294 by netquity
Hello Team,
I have purchased and installed face book connect component on following url www.vstore2.cstorelife.com/ It works fine from home page,but it did not work in pop up. This pop up will appear when you click on the cstore life (clerk image) and close it.Please check and let us know about this issue.Please check attached screen shot for the same.


Thanks & Ragards
Devi
The topic has been locked.
Support Specialist
15 years 4 months ago #7310 by alzander
On your page, I can see 2 calls to Facebook's Javascript library. This is even before any of the pop-ups. If you open the HTML and search for all.js, you'll see a reference to it at the top of the file (that's ours, from JFBConnect) and another at the bottom. Not sure where the 2nd one's coming from, but it's a problem. Both blocks call section of code like FB.Init... and then you're Facebook Application ID. Both are using different IDs, which confuses Facebook and will cause lots of logging in issues.

I don't know if this is the cause of the pop-up issue (though likely), but it will need to be fixed first before we can test anything related to the pop-up.

Please let us know if this helps, or if you have any other questions. If the pop-up still breaks after the extra call to the Facebook library is removed, let us know and we'll dig in!
The topic has been locked.
Active Subscriptions:

None
15 years 4 months ago #7386 by netquity
Hello team,
Thanks for answer.
We have remove that extra javascript file but we are still unable to login into our site using facebook credentials for popup. From the home page it works fine.

Thanks & Regards
Devi
The topic has been locked.
Support Specialist
15 years 4 months ago #7387 by alzander
I'm unsure exactly why it's happening, but I know where to start looking and maybe you can give me some hints as to how you're site may be configured or customized.

Basically, the pop-up is loading an iFrame to the login page, below:
www.vstore2.cstorelife.com/index.php?opt...login&tmpl=component

On this page, there's 2 things that are missing that JFBConnect should be trying to insert into the page:
1) The jfbconnect.js Javascript file. This line should be in the head section and appears like:
<script type="text/javascript" src="/components/com_jfbconnect/includes/jfbconnect.js"></script>
2) A block of Javascript which sets the return pages after logging in or out. It should like the below (which was taken from your homepage):
<script type="text/javascript">var jfbcLogoutFacebook = false;var jfbcLogoutLink = '/en/component/jfbconnect/?task=logout&return=Lw%3D%3D';var jfbcOptionsPermsUrl = 'http://www.vstore2.cstorelife.com/index.php?option=com_jfbconnect&task=loginFacebookUser&return=Lw==';
</script>

We just did a test to see if we included the {} JFBCLogin tag on the login view and threw it into an iFrame if the code above appeared. It worked fine for us, so if possible, can you let us know if there's anything specific you might be doing to prevent that code from being inserted?

If you need to get around this immediately, you could include the above lines of code directly into the login template file. It won't be in the head section, but that shouldn't be a problem. If you need more information on how to do that, let us know.

We hope this helps, and if you know of any reasons why we wouldn't be able to insert into the HTML document when in an iFrame, that may help.

Thanks, and good luck!
The topic has been locked.
Active Subscriptions:

None
15 years 4 months ago #7394 by netquity
Hello team,
Thanks for your help.
We have added javascript code provided by you into our login component and after that it seems that we are able to login into our site using facebook credentials,but
the problem is when it returns it open in iframe while it should refresh the page and should come back on home page after closing the popup. Please guide us.

Thanks & Regards
Devi
The topic has been locked.
Support Specialist
15 years 4 months ago #7396 by alzander
We're so close, I can taste it.

One final change, this time, within JFBConnect. In the /components/com_jfbconnect/includes/jfbconnect.js file, on line 7, change:
self.location = jfbcOptionsPermsUrl;
to:
top.location = jfbcOptionsPermsUrl;

That should break the user out of the frame. We haven't tested this, but are pretty sure it will work. As always, report back, and we'll get you a step closer if you run into anything else!
The topic has been locked.
Active Subscriptions:

None
15 years 4 months ago #7435 by netquity
Hello team,
Now am able to login using facebook credentials and pop up is also closed.
I want to thanks entire team which help me to do so.


Thanks & Regards
Devi
The topic has been locked.
Support Specialist
15 years 4 months ago #7436 by alzander
Devi,
That's great to hear! We're glad we could help, and hope that your site development goes smoothly overall. It's an interesting site you've got there, and we're happy to be a part of it.

If you would like to leave a review for JFBConnect regarding the extension, or our support, on the JED, we'd appreciate it. It's certainly not required though.. we'll continue our great support either way!
extensions.joomla.org/extensions/social-...ook-integration/7215

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