Search code examples
javaapistatusnet

Does twitter Java API like twitter4j work with statusnet?


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?


Solution

  • 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.