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
+        ));
+    };
 }
 
