Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access Twitter or Facebook API from Java ME app?

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?

like image 387
Juliana Peña Avatar asked Dec 04 '25 17:12

Juliana Peña


2 Answers

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.

like image 70
Licky Lindsay Avatar answered Dec 07 '25 07:12

Licky Lindsay


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!

like image 33
brettkelly Avatar answered Dec 07 '25 08:12

brettkelly