9

New to Facebook API and Facebook Connect.

Found the Facebook Java API open source library on Google Code...

I am really excited that there's an API pre-written in Java for it!

Am interested in writing a server side Java layer which uses REST to be able to access a user’s Facebook Friends List, their wall, send them messages in-network, etc.

Downloaded the binary and unfortunately, I haven't found any sample or demo code when I unzipped it...

Question(s):

(1) Does this library support Facebook Connect?

(2) What is the best way to get start using Facebook Connect with server side Java?

(3) Since I am building middleware, do I still have to create a sample app on the online Facebook Developer page?

(4) What should I include in my (am a newbie in Maven) pom.xml in order to get started?

David Basarab
  • 72,212
  • 42
  • 129
  • 156
mw_javaguy
  • 687
  • 6
  • 14
  • 22

2 Answers2

17

Use RestFB, that seems to be the inofficial FB Java Api:

http://restfb.com/

(There is no official FB Java Api anymore)

Carli
  • 171
  • 1
  • 2
5

As far as I know, that library is broken. I couldn't get authentication to work with the latest version.
In my search for alternatives i found the "TinyFBTagLibrary" http://www.socialjava.com/ -- Yes, it requires just about a billion extra libraries to run, but it offers a simple way to execute facebook API calls in java that ISNT BROKEN (once again, as far as I know). My advice is to ignore all of the predefined tags for use in jsp and scroll down to the bottom to see how to use the TinyFBClient.call/getResponse when you need to get information.

Sam
  • 88
  • 5
  • additionally, the FB connect authentication is done with a simple call to the facebook connect javascript library, which then stores a session key in a cookie accessible by your server, and subsequently usable with the API – Sam Sep 03 '09 at 00:48
  • Sam and jimyi! Thanks for the information... I think I am going to use the Facebook Connect library for iPhone instead. – mw_javaguy Sep 03 '09 at 03:07