views:

307

answers:

2

I'm developing a Java ME app and I want to give it social features. Is it possible to connect to Facebook or Twitter directly from the app, without an intermediate server?

+1  A: 

Java Client Libraries for the Twitter API

Facebook access for Java

Those should get you started.

You don't need to use any type of middleware or anything to access services that expose an API, but you will need a client library that either you or somebody else has built (like the ones linked to above).

Good luck!

inkedmn
Thanks, but I'm developing for Java ME and these libaries don't seem to be compatible. Any other ideas?
limitedmage
+1  A: 

These API's are just HTTP when it comes down to bits-on-the-wire. Java ME supports HTTP with the classes in the javax.microedition.io.* package.

http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/io/Connector.html

http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/io/HttpConnection.html

It's been a while but ISTR having to use GET and POST for everything when using these, no RESTful PUT and DELETE.

Licky Lindsay
as Licky saidFacebook API is basically a REST APIthe most crucial thing within the whole classes ist the correct calculation of the fb_sig (the checksum of all send POST params combined with APP Secret)
Andreas Klinger