资 源 简 介
Overview
Facebook provides a Java-based API, but I wanted a slightly different API for a few reasons:
* The Facebook Java API returns org.w3c.Document for calls, which is quite a pain to work with. I prefer using JSON. Javabook uses json-lib, which is a good JSON library that is getting better by the month. It provides conveniences for JSON->Java bean mapping.
* The Facebook Java API uses the JDK"s HTTP client, which is quite poor. The Apache Jakarta Commons HttpClient that Javabook uses is a much better.
* I wanted to incorporate logging and request latency measurement. Javabook uses Apache Jakarta Commons Logging, which integrates nicely with many Java people"s existing logging infrastructure.
* I prefer to turn certain exceptions (such as invalid sessions) into specific exceptions that can be caught and handled by the application.
* I prefer separating the APIs for session-based and non-session-based Facebook methods into separate classes.
* While the Facebook Java