Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook API and Facebook Connect using Java?

Tags:

java

facebook

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?

like image 569
mw_javaguy Avatar asked Sep 01 '09 00:09

mw_javaguy


People also ask

How does an API work with Facebook?

With the conversions API, your website collects the data, the data gets stored on your server, and the data gets sent to Facebook via API. With the pixel, Facebook collects the data (using cookies), the data gets stored on the user's browser, and the data gets sent to Facebook via pixel.

Does Facebook provide API based integration?

The Facebook Graph API is an HTTP-based API that allows developers to extract data and functionality from the Facebook platform. Applications can use this API to programmatically query data, post in pages and groups, and manage ads, among other tasks. The other Facebook APIs are extensions of the Graph API.


2 Answers

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

http://restfb.com/

(There is no official FB Java Api anymore)

like image 58
Carli Avatar answered Oct 21 '22 01:10

Carli


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.

like image 24
Sam Avatar answered Oct 21 '22 01:10

Sam