Fórumok
How to replace/override (FacebookConnectAction)
Peter Hellstrand, módosítva 11 év-val korábban
How to replace/override (FacebookConnectAction)
Regular Member Bejegyzések: 166 Csatlakozás dátuma: 2011.11.30. Legújabb bejegyzések
I have done some hooks, autologin, after login event. replaced jsp. This was simple. How can I replace the code below? Can this be done in a Hook or do I need to do anything else.
The reason I need to do this is that I need to extrakt more than name and email from the jsonObject(facebook). So if any of you have better ideas please share. I have extended the scope of the login button in navigation.jsp. The url in the link looks fine. I just need to extrakt the value(interests) and put them in the User object.
http://www.jarvana.com/jarvana/view/com/liferay/portal/portal-impl/6.0.5/portal-impl-6.0.5-sources.jar!/com/liferay/portlet/login/action/FacebookConnectAction.java?format=ok
The reason I need to do this is that I need to extrakt more than name and email from the jsonObject(facebook). So if any of you have better ideas please share. I have extended the scope of the login button in navigation.jsp. The url in the link looks fine. I just need to extrakt the value(interests) and put them in the User object.
http://www.jarvana.com/jarvana/view/com/liferay/portal/portal-impl/6.0.5/portal-impl-6.0.5-sources.jar!/com/liferay/portlet/login/action/FacebookConnectAction.java?format=ok
Vitaliy Koshelenko, módosítva 11 év-val korábban
RE: How to replace/override (FacebookConnectAction)
Expert Bejegyzések: 319 Csatlakozás dátuma: 2011.03.25. Legújabb bejegyzések
Create a hook (liferay-hook.xml) on struts action like:
(in FacebookConnectActionImpl class implement your own logic).
<!--?xml version="1.0" encoding="UTF-8"?-->
<hook>
<struts-action>
<struts-action-path>/login/facebook_connect</struts-action-path>
<struts-action-impl>com.liferay.portlet.login.action.FacebookConnectActionImpl</struts-action-impl>
</struts-action>
</hook>
(in FacebookConnectActionImpl class implement your own logic).
Peter Hellstrand, módosítva 11 év-val korábban
RE: How to replace/override (FacebookConnectAction)
Regular Member Bejegyzések: 166 Csatlakozás dátuma: 2011.11.30. Legújabb bejegyzések
Thank you. I am getting errors when trying to build. Am I missing something?
30: package com.liferay.portal.struts does not exist
[javac] import com.liferay.portal.struts.ActionConstants;
30: package com.liferay.portal.struts does not exist
[javac] import com.liferay.portal.struts.ActionConstants;
Vitaliy Koshelenko, módosítva 11 év-val korábban
RE: How to replace/override (FacebookConnectAction)
Expert Bejegyzések: 319 Csatlakozás dátuma: 2011.03.25. Legújabb bejegyzések
Check if appropriate libraries are available in your project. It seems that the class com.liferay.portal.struts.ActionConstants is not found.
Rakesh V, módosítva 9 év-val korábban
RE: How to replace/override (FacebookConnectAction)
New Member Bejegyzések: 10 Csatlakozás dátuma: 2014.03.03. Legújabb bejegyzések
Hi Peter Hellstrand,
This is Rakesh and even I'm trying to implement similar functionality like trying to retrieve facebook friends list when the user prefers to login to liferay using a facebook id. I see that even you were trying to implement similar functionality.
I see that we can use facebook rest API to get friends list but I'm not suree how to catch facebook session id in liferay.
So, if possible please provide me the sample code/instructions on how we can achieve this.
This is Rakesh and even I'm trying to implement similar functionality like trying to retrieve facebook friends list when the user prefers to login to liferay using a facebook id. I see that even you were trying to implement similar functionality.
I see that we can use facebook rest API to get friends list but I'm not suree how to catch facebook session id in liferay.
So, if possible please provide me the sample code/instructions on how we can achieve this.