Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Amey Panke
SSO with Twitter ????
October 18, 2012 11:11 PM
Answer

Amey Panke

Rank: New Member

Posts: 12

Join Date: May 24, 2012

Recent Posts

Hello All,

I have a requirement for SSO integration of Liferay Portal with Facebook and Twitter. I was able to integrate SSO with Facebook successfully.
But I am unable to get a breakthrough as to how should I proceed with "SSO integration with twitter".

Would appreciate your help...!!!! emoticon


Thanks.........
Stian Sigvartsen
RE: SSO with Twitter ????
October 20, 2012 7:04 PM
Answer

Stian Sigvartsen

Rank: Regular Member

Posts: 103

Join Date: August 27, 2010

Recent Posts

Sergio Gonzalez has developed and open sourced a hook to enable Twitter user authentication easily: https://github.com/sergiogonzalez/twitter-login-hook

-Stian
Amey Panke
RE: SSO with Twitter ????
October 22, 2012 10:12 PM
Answer

Amey Panke

Rank: New Member

Posts: 12

Join Date: May 24, 2012

Recent Posts

Thanks a ton...!!!! Stian... will definitely try this and let you know...!!!!!! emoticonemoticon
Amey Panke
RE: SSO with Twitter ????
October 25, 2012 5:06 AM
Answer

Amey Panke

Rank: New Member

Posts: 12

Join Date: May 24, 2012

Recent Posts

hey tried it..... it works fine...!!!! emoticon Thank You...!!!
Stian Sigvartsen
RE: SSO with Twitter ????
October 25, 2012 5:10 AM
Answer

Stian Sigvartsen

Rank: Regular Member

Posts: 103

Join Date: August 27, 2010

Recent Posts

Glad to hear it! Thanks should go to Sergio who actually developed this integration emoticon

-Stian
Mohammad Azharuddin
RE: SSO with Twitter ????
April 18, 2013 3:23 AM
Answer

Mohammad Azharuddin

Rank: Expert

Posts: 477

Join Date: September 17, 2012

Recent Posts

HI Stian Sigvartsen
I tried this
if i'm not logged in Twitter account it will ask for twitter login and after authentication it will redirect back to my account(works fine)


But the problem is if i'm already logged in for Twiiter in same browser,then i'm getting error message like this
403 Forbidden: The server understood the request, but is refusing to fulfill it.
Alessio Camillò
RE: SSO with Twitter ????
September 2, 2013 6:47 AM
Answer

Alessio Camillò

Rank: New Member

Posts: 4

Join Date: August 29, 2013

Recent Posts

Hello All,
I have a requirement for SSO integration of Liferay Portal with Twitter.
I was able to deploy twitter-login-hook on my liferay portal instance and i created my app on twitter.
But I am unable to configure properly portal.properties in twitter-login-hook plugin.
I have the following exception:

2-set-2013 11.37.40 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Servlet.service() for servlet [Main Servlet] in context with path [] threw exception [java.lang.NullPointerException] with root cause
java.lang.NullPointerException
at com.sympo.twitter.TwitterOAuth.execute(TwitterOAuth.java:104)
at com.liferay.portal.kernel.struts.BaseStrutsAction.execute(BaseStrutsAction.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
at $Proxy452.execute(Unknown Source)
at com.liferay.portal.struts.ActionAdapter.execute(ActionAdapter.java:50)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:560)
at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:537)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:335)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:216)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:307)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)

and on my debug i have this line:

<?xml version="1.0" encoding="UTF-8"?><errors> <error code="68">The Twitter REST API v1 is no longer active. Please migrate to API v1.1. https://dev.twitter.com/docs/api/1.1/overview.</error></errors>

I'm using liferay-portal-6.1.1-ce-ga2.
Would appreciate your help!!!!

Thanks a lot
Stian Sigvartsen
RE: SSO with Twitter ????
September 2, 2013 7:20 AM
Answer

Stian Sigvartsen

Rank: Regular Member

Posts: 103

Join Date: August 27, 2010

Recent Posts

I believe Twitter has changed its API since Sergio last committed any changes to this hook project. Suspect someone is going to need to review the hook implementation and implement the necessary changes.

-Stian
Mohammad Azharuddin
RE: SSO with Twitter ????
September 3, 2013 10:34 PM
Answer

Mohammad Azharuddin

Rank: Expert

Posts: 477

Join Date: September 17, 2012

Recent Posts

yes.they have changed the api....now they are using only json instead of xml
zeeshan aayan
RE: SSO with Twitter ????
September 3, 2013 11:00 PM
Answer

zeeshan aayan

Rank: New Member

Posts: 4

Join Date: September 3, 2013

Recent Posts

I really want to development in social media site
Mohammad Azharuddin
RE: SSO with Twitter ????
September 3, 2013 11:11 PM
Answer

Mohammad Azharuddin

Rank: Expert

Posts: 477

Join Date: September 17, 2012

Recent Posts

zeeshan aayan:
I really want to development in social media site...........?
Praveen Singh Bais
RE: SSO with Twitter ????
May 12, 2014 7:30 AM
Answer

Praveen Singh Bais

Rank: Junior Member

Posts: 29

Join Date: January 27, 2014

Recent Posts

Hi,

Is there any update on this ? Do we have an API available for twitter login. The older one does not work now.
Stian Sigvartsen
RE: SSO with Twitter ????
April 1, 2015 5:52 AM
Answer

Stian Sigvartsen

Rank: Regular Member

Posts: 103

Join Date: August 27, 2010

Recent Posts

I don't think Sergio is maintaining this anymore and nobody has committed a contribution to it since he stopped.
You may want to check out the following Marketplace plugins -

Social Login for Liferay - If you want something that will just work without any development, though not sure if you can change the presentation etc.

Social Apps Proxy - If you just want general Twitter integration and maintain full control over how it is integrated into Liferay's login process. You will need to use the Social Apps Proxy API as part of a custom Login hook. I can help with this as I created Social Apps Proxy emoticon p.s. I intend to develop a hook which does precisely what you need, but struggling to find the time at the moment!