1

I have tried to access my own statusnet with twitter4j, as I'm trying to build a special Client. Therefore I struggled through many trials. I want to access the statusnet with OAuth, which is provided by twitter4j. First I tried to login with twitter4j by loading statusnet appropriate properties from an own ".properties" file so that it fits the values needed by OAuth. As this didn't really worked well, I changed the custom values as streams and tokens of twitter4j into statusnet one's. This didn't work either as I still get an IllegalStateException thrown when I try to get the OAuth-RequestToken.

Has anybody got experience with writing a Client for Statusnet or another twitter-clone in use of a twitter Java API like twitter4j, especcially with OAuth?

ethnix
  • 1,165
  • 1
  • 8
  • 13

2 Answers2

0

I have it working with status.net (identi.ca) and basic auth - see https://github.com/pilhuhn/ZwitscherA/blob/master/src/de/bsd/zwitscher/account/LoginActivity.java#L124 and then https://github.com/pilhuhn/ZwitscherA/blob/master/src/de/bsd/zwitscher/TwitterHelper.java#L232

Did you get a OAuth application id from status.net?

Heiko Rupp
  • 30,426
  • 13
  • 82
  • 119
  • Thank you! I installed an Instance of statusnet on my own server, registered an OAuth application there and received the keys etc. I've also tried it with the cb as in your example, but for any reason I probably made a little mistake and it didn't work. Now it is at leats accepting my RequestToken, but wants to redirect me to twitter AuhorizationToken, although I defined the OAuthAuthorizationURL in the cb with my socialnetwork Instance. I have a feeling that this OAuth stuff is really ugly... – ethnix Mar 17 '11 at 21:55
  • I will try to fully support that in the future, but did not yet find time to install a private status.net instance so far. So if you get further with your investigations, please add the results to this question. And you are allowed to answer your own question here if you found the solution. – Heiko Rupp Mar 18 '11 at 09:05
0

I have found a solution:

Use Signpost OAuth Api. This is the most simple way to instanciate a individual Oauth Application with individual provider URIs. You can see a example with Twitter here. Replace the Twitter URIs with your statusnet ones and have a try, works really fine and simple.

ethnix
  • 1,165
  • 1
  • 8
  • 13