| Summary: | TweetHub does not connect to Twitter | ||
|---|---|---|---|
| Product: | [RT] ECF | Reporter: | Alexander Boden <alexander.boden> |
| Component: | ecf.twitterhub | Assignee: | ecf.core-inbox <ecf.core-inbox> |
| Status: | RESOLVED WONTFIX | QA Contact: | Marcelo Mayworm <mayworm> |
| Severity: | normal | ||
| Priority: | P3 | CC: | alexander.boden, james, mayworm, slewis |
| Version: | unspecified | Keywords: | helpwanted |
| Target Milestone: | --- | ||
| Hardware: | Macintosh | ||
| OS: | Mac OS X - Carbon (unsup.) | ||
| Whiteboard: | |||
|
Description
Alexander Boden
I believe that twitter has changed it's login/authentication mechanism, and TweetHub has not been updated since this service change...at least as far as I know. If the TweetHub authors know different, please say so. I'm adding helpwanted to this bug, because I'm not sure whether the TweetHub original authors are active on the project any more. Actually that is what I suspected. Twitter now requires OAUTH to use it's API. However, the ECF Twitter Provider seems to rely on the twitter4j libraries, which by now support OAUTH ... so it should probably not too hard to fix the issue. (In reply to comment #1) > I believe that twitter has changed it's login/authentication mechanism, and > TweetHub has not been updated since this service change...at least as far as I > know. If the TweetHub authors know different, please say so. > > I'm adding helpwanted to this bug, because I'm not sure whether the TweetHub > original authors are active on the project any more. (In reply to comment #2) > Actually that is what I suspected. Twitter now requires OAUTH to use it's API. > However, the ECF Twitter Provider seems to rely on the twitter4j libraries, > which by now support OAUTH ... so it should probably not too hard to fix the > issue. I agree...it should not be too hard...either by updating the twitter4j lib...or by using the relatively new ECF REST apis to create a new twitter provider...that uses OATH...AND expose the twitter API as a set of OSGi remote services. I would like to see such a new twitter provider, but unfortunately can't commit to the the effort myself. Hopefully one of the TweetHub creators, and/or you Alexander (or together) will be able to work on this in the relatively short term. If anyone would like explanation and/or support for this from me, then please just let me know. (In reply to comment #3) > (In reply to comment #2) > > Actually that is what I suspected. Twitter now requires OAUTH to use it's API. > > However, the ECF Twitter Provider seems to rely on the twitter4j libraries, > > which by now support OAUTH ... so it should probably not too hard to fix the > > issue. > > I agree...it should not be too hard...either by updating the twitter4j lib...or > by using the relatively new ECF REST apis to create a new twitter > provider...that uses OATH...AND expose the twitter API as a set of OSGi remote > services. I would like to see such a new twitter provider, but unfortunately > can't commit to the the effort myself. Hopefully one of the TweetHub creators, > and/or you Alexander (or together) will be able to work on this in the > relatively short term. If anyone would like explanation and/or support for > this from me, then please just let me know. Sorry for not getting onto this earlier. The easiest way would be to login using OAuth instead of the "old way". We can probably change this around pretty quickly. I like Scott's idea to create a new twitter provider for the backend though. I guess if we want to go with a more impressive implementation, rather than just getting it going again, we should take this approach. Scott, could you give some tips on how to do this? I can probably help out with this in about a week/ten days time, if that's alright. James (In reply to comment #4) > Sorry for not getting onto this earlier. The easiest way would be to login > using OAuth instead of the "old way". We can probably change this around pretty > quickly. Hi! I played a little with org.eclipse.ecf.provider.twitter and got it to work with OAuth. It's really easy, there is example code at http://twitter4j.org/en/code-examples.html which works quite well. What is still missing is a user dialogue for handling the authentification process (right now this has to be done on the Eclipse console), and a way to store the obtained access token (right now the application has to be registered again each time it is started). If somebody wants to do this, I will be happy to share few lines of code I have added. > I like Scott's idea to create a new twitter provider for the backend though. > I guess if we want to go with a more impressive implementation, rather than > just getting it going again, we should take this approach. > Scott, could you give some tips on how to do this? I can probably help out with > this in about a week/ten days time, if that's alright. I am not familiar with the ECF Frameworks so far (and don't know much about OSGi, but that idea sounds great. In case you will be working on this, I wonder if it would be possible to add support for alternative microblogging services like StatusNet/Identi.ca? Best regards, and thanks a million for the great support! Alex (In reply to comment #4) <stuff deleted> > > and/or you Alexander (or together) will be able to work on this in the > > relatively short term. If anyone would like explanation and/or support for > > this from me, then please just let me know. > > Sorry for not getting onto this earlier. The easiest way would be to login > using OAuth instead of the "old way". We can probably change this around pretty > quickly. > I like Scott's idea to create a new twitter provider for the backend though. > I guess if we want to go with a more impressive implementation, rather than > just getting it going again, we should take this approach. > Scott, could you give some tips on how to do this? I can probably help out with > this in about a week/ten days time, if that's alright. Sure. ECF now has a REST RemoteServices API, which is in this bundle: org.eclipse.ecf.remoteservice.rest This allows rest-based services to be exposed to clients as java interfaces that can be called (either synchronously or asynchronously) to invoke the rest based services. An old example of this exists for part of the twitter service here: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/tests/bundles/org.eclipse.ecf.tests.remoteservice.rest/src/org/eclipse/ecf/tests/remoteservice/rest/twitter/TwitterRemoteServiceTest.java This test code is currently commented out...precisely because the actual twitter service underneath moved to Oauth :). But see the setUp() method. This shows how part of the twitter API can be abstracted to a java interface (IUserTimeline), and the IRemoteCallables created to associate IUserTimeline proxy method calls with remote rest calls. Then at runtime (i.e. see actual test cases) the IUserTimeline method calls result in twitter rest service invocations. Note that rather than put all this code in the 'setUp' of a test method, it could be put into a brand new provider plugin...along with the various service interfaces (e.g. IUserTimeline, etc)...so that all that would be necessary to create a full twitter client would be to create an instance of the appropriate type of container (i.e. the container type defined by this new twitter provider plugin). The new twitter provider plugin could extend a couple of classes...i.e. RestClientContainer: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientContainer.java ...or the AbstractClientContainer superclass and RestClientService: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/framework/bundles/org.eclipse.ecf.remoteservice.rest/src/org/eclipse/ecf/remoteservice/rest/client/RestClientService.java So actually creating the twitter provider wouldn't require a lot of code (probably just overriding a few of the methods in RestClientContainer or AbstractClientContainer and RestClientService/AbstractClientService). You can also see an example of doing this (extending some of these classes) for creating an xmlrpc provider...in org.eclipse.ecf.remoteservice.rpc: http://git.eclipse.org/c/ecf/org.eclipse.ecf.git/tree/framework/bundles/org.eclipse.ecf.remoteservice.rpc There's more help/pointers to be provided as well...just let me know if you want more or want to talk by phone. Yes...I do think a full twitter provider would be a great addition...precisely because it could be used on OSGi server-side web applications. Thanks. Scott Reopen with resources for further work on tweethub. |