Changeset 83e90de for perl/modules/Facebook/lib/Facebook/Graph.pm
- Timestamp:
- Sep 19, 2011, 1:31:35 PM (13 years ago)
- Children:
- fd92f78
- Parents:
- c104b43
- git-author:
- Edward Z. Yang <ezyang@mit.edu> (07/14/11 08:58:24)
- git-committer:
- Edward Z. Yang <ezyang@mit.edu> (09/19/11 13:31:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
perl/modules/Facebook/lib/Facebook/Graph.pm
r9820d55 r83e90de 7 7 use MIME::Base64::URLSafe; 8 8 use JSON; 9 with 'Facebook::Graph::Role::Uri'; 9 10 use Facebook::Graph::AccessToken; 10 11 use Facebook::Graph::Authorize; … … 21 22 use Facebook::Graph::Publish::RSVPAttending; 22 23 use Facebook::Graph::Publish::RSVPDeclined; 24 use URI::Encode qw(uri_decode); 25 use AnyEvent::HTTP; 23 26 use Ouch; 24 27 … … 113 116 } 114 117 118 sub delete { 119 my ($self, $id, $cb) = @_; 120 my %query; 121 if ($self->has_access_token) { 122 $query{access_token} = uri_decode($self->access_token); 123 } 124 my $uri = $self->uri; 125 $uri->path($id); 126 $uri->query_form(%query); 127 http_request(DELETE => $uri->as_string, sub { 128 my ($response, $headers) = @_; 129 my %params = ( 130 response => $response, 131 headers => $headers, 132 uri => $uri 133 ); 134 if ($self->has_secret) { 135 $params{secret} = $self->secret; 136 } 137 $cb->(Facebook::Graph::Response->new(%params)); 138 }); 139 () # return nothing 140 } 141 115 142 sub picture { 116 143 my ($self, $object_name) = @_;
Note: See TracChangeset
for help on using the changeset viewer.