Topic-icon Redirect to page after login which is mentioned in return paramter

Active Subscriptions:

None
Hello,

We are using JFBC component on our website and its working perfectly there. Now, we have a small requirement which I noted is not availabale by default but can be done with minor code level change.

Requirement is: If a user enters our website without login, k2 pages along with other jomsocial links appears but when they click on any link, they will be redirected to login/register page and I am changing URL to something like blabber.buzz/component/community/registe...e-speech-row-special . Return parameter will hold URL of link which actually got clicked. Now after successful login using social link or through default jomsocial login, they will be redirected to URL mentioned in return parameter.

Kindly let me know how we can achieve this?

Thanks
The topic has been locked.
Support Specialist
I'm not so sure you'll have to set the return parameter in the link URL. Have you tried setting the 'Returning User Redirection' and 'New User Redirection' settings in the JFBConnect > Configuration > General area? If you set them to 'Same Page', when logging in with social credentials, you should be redirected after that intermediate login page to the link that was clicked on. Also, if I'm correct in assuming these links are registered links, then if you log in with Joomla credentials, the same behavior should occur. If the redirection links are set to a specific page, that might be why you're not going to the expected link.

-Melissa
The topic has been locked.
Active Subscriptions:

None
Melissa,

All configurations are OK in admin but now our requirement is changed.

We have k2 articles listing on home page. If a person click on read more link of any k2 article, it is suppose to open k2 page but we want that people will be redirected to login/register page and once they logged in the site then respective k2 page get displayed (and not k2 listing page(pre). I hope I had cleared my point. let me know how we can accomplish this.

Thanks
The topic has been locked.
Support Specialist
Can you post the listing page you're talking about? I can't find a viewable page on your site that doesn't automatically take me to the login page. Seeing how things are setup will help.

I'm not exactly sure how K2 works with Read More links, but a Joomla article Read More link to a registered article will redirect the user to the login page and the URL will have a special parameter like ?return=Lz3lkjab8asl

That 'return' parameter is used by Joomla and JFBConnect to know where to send the user after they authenticate. Feel free to test that with a Joomla article with a teaser intro to see how it works. I believe K2 does the same thing. JFBConnect should respect those return parameters in both cases.

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

None
Hi Alex,

We were able to solve this issue with the instructions you provided.

Now, we have another weird issue. Joomla session timeout period on our website is 10 minutes which simply means if a user did not perform any activity for 10 minutes then they will be automatically logged out.

But when a user login through JFBC, their session remain intact which actually we want but here situation is different. Suppose a user login through fb link and after that, they did not perform any activity for 10 minutes. Now, after 10 minutes if they try to open any page of website, initially they appear as logged out but just within few seconds page got refreshed and they appear as logged in which really create doubt in mind of users.

What really We want is that when people login to website using social login link, they always appear as active even if they check website the next day. No page refresh in this case. Let me know how to handle this situation?

Thanks
Nirmal
The topic has been locked.
Support Specialist
The behavior you describe about users logging in automatically is what happens when you have the "Automatically Log-In Facebook Users" setting enabled. When that happens, if the user is logged into Facebook already (in another tab) and they visit your site, we have some Javascript on the page that can detect they are logged in on Facebook and will refresh the page to log them in.

Unfortunately, there isn't a way to bypass that brief period when they are logged out but then immediately logged in.

You can enable the "Show 'Logging In' message which will show a popup on the site when they are being logged in, which makes it more clear as to what's happening.

I hope that helps explain, but should you need anything else, please let us know.

Thanks,
Alex
The topic has been locked.