line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Facebook::Graph::Publish::Comment; |
2
|
|
|
|
|
|
|
$Facebook::Graph::Publish::Comment::VERSION = '1.1203'; |
3
|
4
|
|
|
4
|
|
23
|
use Moo; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
19
|
|
4
|
|
|
|
|
|
|
extends 'Facebook::Graph::Publish'; |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
1071
|
use constant object_path => '/comments'; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
578
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has message => ( |
9
|
|
|
|
|
|
|
is => 'rw', |
10
|
|
|
|
|
|
|
predicate => 'has_message', |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub set_message { |
14
|
0
|
|
|
0
|
1
|
|
my ($self, $message) = @_; |
15
|
0
|
|
|
|
|
|
$self->message($message); |
16
|
0
|
|
|
|
|
|
return $self; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
around get_post_params => sub { |
22
|
|
|
|
|
|
|
my ($orig, $self) = @_; |
23
|
|
|
|
|
|
|
my $post = $orig->($self); |
24
|
|
|
|
|
|
|
if ($self->has_message) { |
25
|
|
|
|
|
|
|
push @$post, message => $self->message; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
return $post; |
28
|
|
|
|
|
|
|
}; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 NAME |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
Facebook::Graph::Publish::Comment - Publish a comment on a post. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 VERSION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
version 1.1203 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 SYNOPSIS |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
my $fb = Facebook::Graph->new; |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
$fb->add_comment($comment_id) |
46
|
|
|
|
|
|
|
->set_message('Why so serious?') |
47
|
|
|
|
|
|
|
->publish; |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 DESCRIPTION |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This module gives you quick and easy access to publish comments on posts. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
B<ATTENTION:> You must have the C<publish_stream> privilege to use this module. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=head2 set_message ( message ) |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
Sets the text to post to the wall. |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=head3 message |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
A string of text. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 publish ( ) |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Posts the data and returns a L<Facebook::Graph::Response> object. The response object should contain the id: |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
{"id":"1647395831_130068550371568"} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 LEGAL |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Facebook::Graph is Copyright 2010 - 2012 Plain Black Corporation (L<http://www.plainblack.com>) and is licensed under the same terms as Perl itself. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=cut |