Index: perl/modules/Facebook/README
===================================================================
--- perl/modules/Facebook/README	(revision e1ed6f4293d755aa449e3627b035ca3020a267b7)
+++ perl/modules/Facebook/README	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -24,10 +24,4 @@
 
 INFELICITIES
-  * Polling Facebook is pretty slow (on order of a second or more),
-    and blocks the entire BarnOwl interface.  We have a plan for
-    fixing this, which involves creating an async version of
-    Facebook::Graph.  I have been in contact with the original
-    author JT Smith about this.
-
   * BarnOwl will not receive all comments for news feed items, only
     comments for items that were recently published.  There is not
Index: perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm
===================================================================
--- perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm	(revision d9c6631ad0a731895d10198c237a343ef220403a)
+++ perl/modules/Facebook/lib/BarnOwl/Module/Facebook/Handle.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -165,7 +165,5 @@
 sub check_result {
     my $self = shift;
-    if (kiss 400) {
-        # Ugh, no easy way of accessing the JSON error type
-        # which is OAuthException.
+    if (kiss "OAuthException") {
         $self->{logged_in} = 0;
         $self->facebook_do_auth;
@@ -185,48 +183,51 @@
     return unless $self->{logged_in};
 
-    my $friends = eval { $self->{facebook}->fetch('me/friends'); };
-    return unless $self->check_result;
-
-    $self->{friends} = {};
-
-    for my $friend (@{$friends->{data}}) {
-        if (defined $self->{friends}{$friend->{name}}) {
-            # XXX We should try a little harder here, rather than just
-            # tacking on a number.  Ideally, we should be able to
-            # calculate some extra piece of information that the user
-            # needs to disambiguate between the two users.  An old
-            # version of Facebook used to disambiguate with your primary
-            # network (so you might have Edward Yang (MIT) and Edward
-            # Yang (Cambridge), the idea being that users in the same
-            # network would probably have already disambiguated
-            # themselves with middle names or nicknames.  We no longer
-            # get network information, since Facebook axed that
-            # information, but the Education/Work fields may still be
-            # a reasonable approximation (but which one do you pick?!
-            # The most recent one.)  Since getting this information
-            # involves extra queries, there are also caching and
-            # efficiency concerns (though hopefully you don't have too
-            # many friends with the same name).  Furthermore, accessing
-            # this information requires a pretty hefty extra set of
-            # permissions requests, which we don't currently ask for.
-            #   It may just be better to let users specify custom
-            # aliases for Facebook users, which are added into this
-            # hash.  See also username support.
-            warn "Duplicate friend name " . $friend->{name};
-            my $name = $friend->{name};
-            my $i = 2;
-            while (defined $self->{friends}{$friend->{name} . ' ' . $i}) { $i++; }
-            $self->{friends}{$friend->{name} . ' ' . $i} = $friend->{id};
-        } else {
-            $self->{friends}{$friend->{name}} = $friend->{id};
+    $self->{facebook}->query->find('me/friends')->request(sub {
+        my $response = shift;
+        my $friends = eval { $response->as_hashref };
+        return unless $self->check_result;
+
+        $self->{friends} = {};
+
+        for my $friend (@{$friends->{data}}) {
+            if (defined $self->{friends}{$friend->{name}}) {
+                # XXX We should try a little harder here, rather than just
+                # tacking on a number.  Ideally, we should be able to
+                # calculate some extra piece of information that the user
+                # needs to disambiguate between the two users.  An old
+                # version of Facebook used to disambiguate with your primary
+                # network (so you might have Edward Yang (MIT) and Edward
+                # Yang (Cambridge), the idea being that users in the same
+                # network would probably have already disambiguated
+                # themselves with middle names or nicknames.  We no longer
+                # get network information, since Facebook axed that
+                # information, but the Education/Work fields may still be
+                # a reasonable approximation (but which one do you pick?!
+                # The most recent one.)  Since getting this information
+                # involves extra queries, there are also caching and
+                # efficiency concerns (though hopefully you don't have too
+                # many friends with the same name).  Furthermore, accessing
+                # this information requires a pretty hefty extra set of
+                # permissions requests, which we don't currently ask for.
+                #   It may just be better to let users specify custom
+                # aliases for Facebook users, which are added into this
+                # hash.  See also username support.
+                warn "Duplicate friend name " . $friend->{name};
+                my $name = $friend->{name};
+                my $i = 2;
+                while (defined $self->{friends}{$friend->{name} . ' ' . $i}) { $i++; }
+                $self->{friends}{$friend->{name} . ' ' . $i} = $friend->{id};
+            } else {
+                $self->{friends}{$friend->{name}} = $friend->{id};
+            }
         }
-    }
-
-    # XXX We should also have support for usernames, and not just real
-    # names. However, since this data is not returned by the friends
-    # query, it would require a rather expensive set of queries. We
-    # might try to preserve old data, but all-in-all it's a bit
-    # complicated.  One possible way of fixing this is to construct a
-    # custom FQL query that joins the friends table and the users table.
+
+        # XXX We should also have support for usernames, and not just real
+        # names. However, since this data is not returned by the friends
+        # query, it would require a rather expensive set of queries. We
+        # might try to preserve old data, but all-in-all it's a bit
+        # complicated.  One possible way of fixing this is to construct a
+        # custom FQL query that joins the friends table and the users table.
+    });
 }
 
@@ -244,104 +245,105 @@
     $self->{topics} = {};
 
-    my $updates = eval {
-        $self->{facebook}
-             ->query
-             ->from("my_news")
-             # Not using this, because we want to pick up comment
-             # updates. We need to manually de-duplicate, though.
-             # ->where_since("@" . $self->{last_poll})
-             # Facebook doesn't actually give us that many results.
-             # But it can't hurt to ask!
-             ->limit_results(200)
-             ->request
-             ->as_hashref
-    };
-    return unless $self->check_result;
-
-    my $new_last_poll = $self->{last_poll};
-    for my $post (reverse @{$updates->{data}}) {
-        # No app invites, thanks! (XXX make configurable)
-        if ($post->{type} eq 'link' && $post->{application}) {
-            next;
-        }
-
-        # XXX Filtering out interest groups for now
-        # A more reasonable strategy may be to show their
-        # posts, but not the comments.
-        if (defined $post->{from}{category}) {
-            next;
-        }
-
-        # There can be multiple recipients! Strange! Pick the first one.
-        my $name    = $post->{to}{data}[0]{name} || $post->{from}{name};
-        my $name_id = $post->{to}{data}[0]{id} || $post->{from}{id};
-        my $post_id  = $post->{id};
-
-        my $topic;
-        if (defined $old_topics->{$post_id}) {
-            $topic = $old_topics->{$post_id};
-            $self->{topics}->{$post_id} = $topic;
-        } else {
-            my @keywords = keywords($post->{name} || $post->{message});
-            $topic = $keywords[0] || 'personal';
-            $topic =~ s/ /-/g;
-            $self->{topics}->{$post_id} = $topic;
-        }
-
-        # Only handle post if it's new
-        my $created_time = str2time($post->{created_time});
-        if ($created_time >= $self->{last_poll}) {
-            # XXX indexing is fragile
-            my $msg = BarnOwl::Message->new(
-                type      => 'Facebook',
-                sender    => $post->{from}{name},
-                sender_id => $post->{from}{id},
-                name      => $name,
-                name_id   => $name_id,
-                direction => 'in',
-                body      => $self->format_body($post),
-                post_id   => $post_id,
-                topic     => $topic,
-                time      => asctime(localtime $created_time),
-                # XXX The intent is to get the 'Comment' link, which also
-                # serves as a canonical link to the post.  The {name}
-                # field should equal 'Comment'.
-                permalink => $post->{actions}[0]{link},
-               );
-            BarnOwl::queue_message($msg);
-        }
-
-        # This will interleave times (they'll all be organized by parent
-        # post), but since we don't expect too many updates between
-        # polls this is pretty acceptable.
-        my $updated_time = str2time($post->{updated_time});
-        if ($updated_time >= $self->{last_poll} && defined $post->{comments}{data}) {
-            for my $comment (@{$post->{comments}{data}}) {
-                my $comment_time = str2time($comment->{created_time});
-                if ($comment_time < $self->{last_poll}) {
-                    next;
-                }
+    $self->{facebook}
+         ->query
+         ->from("my_news")
+         # Not using this, because we want to pick up comment
+         # updates. We need to manually de-duplicate, though.
+         # ->where_since("@" . $self->{last_poll})
+         # Facebook doesn't actually give us that many results.
+         # But it can't hurt to ask!
+         ->limit_results(200)
+         ->request(sub {
+
+        my $updates = eval { shift->as_hashref };
+        return unless $self->check_result;
+
+        my $new_last_poll = $self->{last_poll};
+        for my $post (reverse @{$updates->{data}}) {
+            # No app invites, thanks! (XXX make configurable)
+            if ($post->{type} eq 'link' && $post->{application}) {
+                next;
+            }
+
+            # XXX Filtering out interest groups for now
+            # A more reasonable strategy may be to show their
+            # posts, but not the comments.
+            if (defined $post->{from}{category}) {
+                next;
+            }
+
+            # There can be multiple recipients! Strange! Pick the first one.
+            my $name    = $post->{to}{data}[0]{name} || $post->{from}{name};
+            my $name_id = $post->{to}{data}[0]{id} || $post->{from}{id};
+            my $post_id  = $post->{id};
+
+            my $topic;
+            if (defined $old_topics->{$post_id}) {
+                $topic = $old_topics->{$post_id};
+                $self->{topics}->{$post_id} = $topic;
+            } else {
+                my @keywords = keywords($post->{name} || $post->{message});
+                $topic = $keywords[0] || 'personal';
+                $topic =~ s/ /-/g;
+                $self->{topics}->{$post_id} = $topic;
+            }
+
+            # Only handle post if it's new
+            my $created_time = str2time($post->{created_time});
+            if ($created_time >= $self->{last_poll}) {
+                # XXX indexing is fragile
                 my $msg = BarnOwl::Message->new(
                     type      => 'Facebook',
-                    sender    => $comment->{from}{name},
-                    sender_id => $comment->{from}{id},
+                    sender    => $post->{from}{name},
+                    sender_id => $post->{from}{id},
                     name      => $name,
                     name_id   => $name_id,
                     direction => 'in',
-                    body      => $comment->{message},
+                    body      => $self->format_body($post),
                     post_id   => $post_id,
                     topic     => $topic,
-                    time      => asctime(localtime $comment_time),
+                    time      => asctime(localtime $created_time),
+                    # XXX The intent is to get the 'Comment' link, which also
+                    # serves as a canonical link to the post.  The {name}
+                    # field should equal 'Comment'.
+                    permalink => $post->{actions}[0]{link},
                    );
                 BarnOwl::queue_message($msg);
             }
+
+            # This will interleave times (they'll all be organized by parent
+            # post), but since we don't expect too many updates between
+            # polls this is pretty acceptable.
+            my $updated_time = str2time($post->{updated_time});
+            if ($updated_time >= $self->{last_poll} && defined $post->{comments}{data}) {
+                for my $comment (@{$post->{comments}{data}}) {
+                    my $comment_time = str2time($comment->{created_time});
+                    if ($comment_time < $self->{last_poll}) {
+                        next;
+                    }
+                    my $msg = BarnOwl::Message->new(
+                        type      => 'Facebook',
+                        sender    => $comment->{from}{name},
+                        sender_id => $comment->{from}{id},
+                        name      => $name,
+                        name_id   => $name_id,
+                        direction => 'in',
+                        body      => $comment->{message},
+                        post_id   => $post_id,
+                        topic     => $topic,
+                        time      => asctime(localtime $comment_time),
+                        permalink => "",
+                       );
+                    BarnOwl::queue_message($msg);
+                }
+            }
+            if ($updated_time + 1 > $new_last_poll) {
+                $new_last_poll = $updated_time + 1;
+            }
         }
-        if ($updated_time + 1 > $new_last_poll) {
-            $new_last_poll = $updated_time + 1;
-        }
-    }
-    # old_topics gets GC'd
-
-    $self->{last_poll} = $new_last_poll;
+        # old_topics gets GC'd
+
+        $self->{last_poll} = $new_last_poll;
+    });
 }
 
@@ -375,13 +377,12 @@
     my $msg = shift;
 
+    my $cont = sub { $self->sleep(0); };
+
     if (defined $user) {
         $user = $self->{friends}{$user} || $user;
-        eval { $self->{facebook}->add_post($user)->set_message($msg)->publish; };
-        return unless $self->check_result;
+        $self->{facebook}->add_post($user)->set_message($msg)->publish($cont);
     } else {
-        eval { $self->{facebook}->add_post->set_message($msg)->publish; };
-        return unless $self->check_result;
-    }
-    $self->sleep(0);
+        $self->{facebook}->add_post->set_message($msg)->publish($cont);
+    }
 }
 
@@ -392,7 +393,5 @@
     my $msg = shift;
 
-    eval { $self->{facebook}->add_comment($post_id)->set_message($msg)->publish; };
-    return unless $self->check_result;
-    $self->sleep(0);
+    $self->{facebook}->add_comment($post_id)->set_message($msg)->publish(sub { $self->sleep(0); });
 }
 
@@ -416,12 +415,14 @@
 
     $self->{cfg}->{token} = $1;
-    if ($self->facebook_do_auth) {
+    $self->facebook_do_auth(sub {
         my $raw_cfg = to_json($self->{cfg});
         BarnOwl::admin_message('Facebook', "Add this as the contents of your ~/.owl/facebook file:\n$raw_cfg");
-    }
+    });
+    return;
 }
 
 sub facebook_do_auth {
     my $self = shift;
+    my $success = shift || sub {};
     if (!defined $self->{cfg}->{token}) {
         BarnOwl::admin_message('Facebook', "Login to Facebook at ".$self->{login_url}
@@ -437,17 +438,18 @@
     $self->{facebook}->access_token($self->{cfg}->{token});
     # Do a quick check to see if things are working
-    my $result = eval { $self->{facebook}->query()->find('me')->select_fields('name')->request->as_hashref; };
-    if ($@) {
-        BarnOwl::admin_message('Facebook', "Failed to authenticate with '$@'!"
-            . "\nLogin to Facebook at ".$self->{login_url}
-            . "\nand run command ':facebook-auth URL' with the URL you are redirected to.");
-        return 0;
-    } else {
-        my $name = $result->{'name'};
-        BarnOwl::admin_message('Facebook', "Successfully logged in to Facebook as $name!");
-        $self->{logged_in} = 1;
-        $self->sleep(0); # start polling
-        return 1;
-    }
+    $self->{facebook}->query()->find('me')->select_fields('name')->request(sub {
+        my $result = eval { shift->as_hashref };
+        if ($@) {
+            BarnOwl::admin_message('Facebook', "Failed to authenticate with '$@'!"
+                . "\nLogin to Facebook at ".$self->{login_url}
+                . "\nand run command ':facebook-auth URL' with the URL you are redirected to.");
+        } else {
+            my $name = $result->{'name'};
+            BarnOwl::admin_message('Facebook', "Successfully logged in to Facebook as $name!");
+            $self->{logged_in} = 1;
+            $self->sleep(0); # start polling
+            $success->();
+        }
+    });
 }
 
Index: perl/modules/Facebook/lib/Facebook/Graph.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -62,24 +62,24 @@
 
 sub request_access_token {
-    my ($self, $code) = @_;
-    my $token = Facebook::Graph::AccessToken->new(
+    my ($self, $code, $cb) = @_;
+    Facebook::Graph::AccessToken->new(
         code            => $code,
         postback        => $self->postback,
         secret          => $self->secret,
         app_id          => $self->app_id,
-    )->request;
-    $self->access_token($token->token);
-    return $token;
+    )->request(sub {
+        my ($response) = @_;
+        $self->access_token($response->token);
+        $cb->($response);
+    });
 }
 
 sub convert_sessions {
-    my ($self, $sessions) = @_;
-    return Facebook::Graph::Session->new(
+    my ($self, $sessions, $cb) = @_;
+    Facebook::Graph::Session->new(
         secret          => $self->secret,
         app_id          => $self->app_id,
         sessions        => $sessions,
-        )
-        ->request
-        ->as_hashref;
+    )->request($cb); # API change
 }
 
@@ -92,8 +92,12 @@
 }
 
-sub fetch {
-    my ($self, $object_name) = @_;
-    return $self->query->find($object_name)->request->as_hashref;
-}
+# XXX error handling
+#sub fetch {
+#    my ($self, $object_name, $cb) = @_;
+#    $self->query->find($object_name)->request(sub {
+#        my ($result) = @_;
+#        $cb->($result->as_hashref);
+#    });
+#}
 
 sub query {
@@ -540,6 +544,5 @@
 L<Any::Moose>
 L<JSON>
-L<LWP>
-L<LWP::Protocol::https>
+L<AnyEvent::HTTP>
 L<Mozilla::CA>
 L<URI>
Index: perl/modules/Facebook/lib/Facebook/Graph/AccessToken.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph/AccessToken.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph/AccessToken.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -7,5 +7,5 @@
 use Facebook::Graph::AccessToken::Response;
 with 'Facebook::Graph::Role::Uri';
-use LWP::UserAgent;
+use AnyEvent::HTTP;
 
 has app_id => (
@@ -43,7 +43,13 @@
 
 sub request {
-    my ($self) = @_;
-    my $response = LWP::UserAgent->new->get($self->uri_as_string);
-    return Facebook::Graph::AccessToken::Response->new(response => $response);
+    my ($self, $cb) = @_;
+    http_get $self->uri_as_string, sub {
+        my ($response, $headers) = @_;
+        $cb->(Facebook::Graph::AccessToken::Response->new(
+            response => $response,
+            headers => $headers,
+            uri => $self->uri_as_string
+        ));
+    };
 }
 
Index: perl/modules/Facebook/lib/Facebook/Graph/AccessToken/Response.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph/AccessToken/Response.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph/AccessToken/Response.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -18,12 +18,10 @@
     lazy    => 1,
     default => sub {
+        # LOL error handling
         my $self = shift;
-        my $response = $self->response;
-        if ($response->is_success) {
-            return URI->new('?'.$response->content)->query_param('access_token');
-        }
-        else {
-            ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string;
-        }
+        return URI->new('?'.$self->response)->query_param('access_token');
+        #else {
+        #    ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string;
+        #}
     }
 );
@@ -33,12 +31,10 @@
     lazy    => 1,
     default => sub {
+        # LOL error handling
         my $self = shift;
-        my $response = $self->response;
-        if ($response->is_success) {
-            return URI->new('?'.$response->content)->query_param('expires');
-        }
-        else {
-            ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string;
-        }
+        return URI->new('?'.$self->response)->query_param('expires');
+        #else {
+        #    ouch $response->code, 'Could not fetch access token: '.$response->message, $response->request->uri->as_string;
+        #}
     }
 );
Index: perl/modules/Facebook/lib/Facebook/Graph/Publish.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph/Publish.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph/Publish.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -7,5 +7,7 @@
 use Facebook::Graph::Response;
 with 'Facebook::Graph::Role::Uri';
-use LWP::UserAgent;
+use AnyEvent::HTTP;
+use LWP::UserAgent; # XXX blegh
+use HTTP::Request::Common;
 use URI::Encode qw(uri_decode);
 
@@ -42,13 +44,22 @@
 
 sub publish {
-    my ($self) = @_;
+    my ($self, $cb) = @_;
     my $uri = $self->uri;
     $uri->path($self->object_name.$self->object_path);
-    my $response = LWP::UserAgent->new->post($uri, $self->get_post_params);
-    my %params = (response => $response);
-    if ($self->has_secret) {
-        $params{secret} = $self->secret;
+    # XXX blegh
+    my $request = LWP::UserAgent->new->request(POST $uri->as_string, $self->get_post_params);
+    http_post $uri->as_string, $request->content, sub {
+        warn "whooo";
+        my ($response, $headers) = @_;
+        my %params = (
+            response => $response,
+            headers  => $headers,
+            uri      => $uri->as_string
+        );
+        if ($self->has_secret) {
+            $params{secret} = $self->secret;
+        }
+        $cb->(Facebook::Graph::Response->new(%params));
     }
-    return Facebook::Graph::Response->new(%params);
 }
 
Index: perl/modules/Facebook/lib/Facebook/Graph/Query.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph/Query.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph/Query.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -7,5 +7,5 @@
 use Facebook::Graph::Response;
 with 'Facebook::Graph::Role::Uri';
-use LWP::UserAgent;
+use AnyEvent::HTTP;
 use URI::Encode qw(uri_decode);
 
@@ -183,12 +183,18 @@
 
 sub request {
-    my ($self, $uri) = @_;
-    $uri ||= $self->uri_as_string;
-    my $response = LWP::UserAgent->new->get($uri);
-    my %params = (response => $response);
-    if ($self->has_secret) {
-        $params{secret} = $self->secret;
-    }
-    return Facebook::Graph::Response->new(%params);
+    my ($self, $cb) = @_;
+    my $uri = $self->uri_as_string;
+    http_get $uri, sub {
+        my ($response, $headers) = @_;
+        my %params = (
+            response => $response,
+            headers => $headers,
+            uri => $uri
+        );
+        if ($self->has_secret) {
+            $params{secret} = $self->secret;
+        }
+        $cb->(Facebook::Graph::Response->new(%params));
+    };
 }
 
Index: perl/modules/Facebook/lib/Facebook/Graph/Response.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph/Response.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph/Response.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -13,4 +13,14 @@
 );
 
+has headers => (
+    is      => 'ro',
+    required=> 1,
+);
+
+has uri => (
+    is      => 'ro',
+    required=> 1,
+);
+
 has as_string => (
     is      => 'ro',
@@ -18,5 +28,18 @@
     default => sub {
         my $self = shift;
-        return $self->response->content;
+        if (!defined $self->response) {
+            ouch $self->headers->{Status}, $self->headers->{Reason}, $self->uri;
+        }
+        if ($self->headers->{Status} < 200 || $self->headers->{Status} >= 300) {
+            my $type = $self->headers->{Status};
+            my $message = $self->response;
+            my $error = eval { JSON->new->decode($self->response) };
+            unless ($@) {
+                $type = $error->{error}{type};
+                $message = $error->{error}{message};
+            }
+            ouch $type, 'Could not execute request ('.$self->uri.'): '.$message, $self->uri;
+        }
+        return $self->response;
     },
 );
@@ -27,16 +50,5 @@
     default => sub {
         my $self = shift;
-        my $response = $self->response;
-        if ($response->is_success) {
-            return $response->content;
-        }
-        else {
-            my $message = $response->message;
-            my $error = eval { JSON->new->decode($response->content) };
-            unless ($@) {
-                $message = $error->{error}{type} . ' - ' . $error->{error}{message};
-            }
-            ouch $response->code, 'Could not execute request ('.$response->request->uri->as_string.'): '.$message, $response->request->uri->as_string;
-        }
+        return $self->as_string;
     },
 );
Index: perl/modules/Facebook/lib/Facebook/Graph/Session.pm
===================================================================
--- perl/modules/Facebook/lib/Facebook/Graph/Session.pm	(revision 2a42248bcad3cd18bf22fbfbf90afa52f263643e)
+++ perl/modules/Facebook/lib/Facebook/Graph/Session.pm	(revision 7777ac2e60b2881335b640f14a3829dedb83826c)
@@ -7,5 +7,5 @@
 use Facebook::Graph::Response;
 with 'Facebook::Graph::Role::Uri';
-use LWP::UserAgent;
+use AnyEvent::HTTP;
 
 has app_id => (
@@ -38,7 +38,13 @@
 
 sub request {
-    my ($self) = @_;
-    my $response = LWP::UserAgent->new->get($self->uri_as_string);
-    return Facebook::Graph::Response->new(response => $response);
+    my ($self, $cb) = @_;
+    http_get $self->uri_as_string, sub {
+        my ($response, $headers) = @_;
+        $cb->(Facebook::Graph::Response->new(
+            response => $response,
+            headers  => $headers,
+            uri      => $self->uri_as_string
+        ));
+    };
 }
 
