share-extras/share-oauth

Support for Alfresco 4.0.e and twitter API 1.1

Closed this issue · 7 comments

Hi,

I've followed the steps to install share-oauth 2.3 to Alfresco 4.0.e
At startup I see:

[jar:file:/C:/Alfresco/tomcat/webapps/alfresco/WEB-INF/lib/share-oauth-repo-2.3.0.jar!/alfresco/extension/tokenstore-webscripts-context.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/alfresco/service/cmr/oauth2/OAuth2CredentialsStoreService

Is the jar compatible only on Alfresco 4.2.x?

Best Regards
Vincenzo

Yes, the latest JAR is not compatible with versions of Alfresco before 4.2 Community or 4.1 Enterprise. You could try using the v2.2 JAR, this should work OK for accessing the Twitter API.

Thanks for your answer.

I've installed the v2.2 of the JAR on Alfresco 4.0.e but the twitter dashlet (v2.6-dev) return "Request Token Failed" with the following error in catalina.out:

org.apache.commons.httpclient.ProtocolException: Unbuffered entity enclosing request can not be repeated.

Instead using v2.3 of the jar on Alfresco 4.2.e with the same dashlet works fine

Excuse me wabson, but the version 2.2 of the JAR works fine, there was an error on trusted store on my java virtual machine

Best Regards
Vincenzo

Great to hear, thanks! I will update the README with this info.

README fixed in 6d73c9e

Hi,

I'm using share_oauth version 2.2, and how I explain in the post (19 of may) the twitter dashlet until now worked fine. Today, without any modification, I see that I receive again "Request access token fail. Required parameters not sent."

Is the oauth depending from the twitter certificate?
How can I test (also out of Alfresco) If works?

Best Regards
Vincenzo

Hi Wabson,

I see that now when I call the URL http://<>/share/proxy/twitter-auth/oauth/request_token do not return more the oauth data (oauth_token, oauth_token_secret ....) but empty response with a warning in browser console:

"The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature."

Have you idea what's the error that I've done?
Other than open http/https protocol in "out" from alfresco server I need to enable other things on firewall?

Thanks in advance
Vincenzo