This is the first time I've announced this opensource project in this forum
because until now there wasn't anything GAE-specific about it.  You can
still use BatchFB outside of GAE, but now BatchFB will use asynchronous
fetching on App Engine to issue multiple batches to Facebook in parallel.
 This is *the* fastest way to pull down significant quantities of data from
Facebook.

http://batchfb.googlecode.com/

Here is a quick snippet of code:

---

Batcher batcher = new FacebookBatcher(accessToken);

Later<User> me = batcher.graph("me", User.class);
Later<User> mark = batcher.graph("markzuckerberg", User.class);
Later<List<User>> myFriends = batcher.query(
    "SELECT uid, first_name, pic_square FROM user WHERE uid IN" +
    "(SELECT uid2 FROM friend WHERE uid1 = " + myId + ")", User.class);
Later<User> bob = batcher.queryFirst("SELECT timezone FROM user WHERE
uid = " + bobsId, User.class);
PagedLater<Post> feed = batcher.paged("me/feed", Post.class);

// No calls to Facebook have been made yet.  The following get() will
execute the
// whole batch as a single Facebook call.
String timezone = bob.get().timezone;

---

You can stack up hundreds of Graph and FQL requests using the Future<?>-like
interface; BatchFB will group them into batches and execute the batches in
parallel on App Engine.

Enjoy,
Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to