line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Facebook::Graph::Publish::PageTab; |
2
|
|
|
|
|
|
|
$Facebook::Graph::Publish::PageTab::VERSION = '1.1204'; |
3
|
4
|
|
|
4
|
|
24
|
use Moo; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
17
|
|
4
|
|
|
|
|
|
|
extends 'Facebook::Graph::Publish'; |
5
|
|
|
|
|
|
|
|
6
|
4
|
|
|
4
|
|
1059
|
use constant object_path => '/tabs'; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
486
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has app_id => ( |
9
|
|
|
|
|
|
|
is => 'rw', |
10
|
|
|
|
|
|
|
required => 1, |
11
|
|
|
|
|
|
|
); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
around get_post_params => sub { |
14
|
|
|
|
|
|
|
my ($orig, $self) = @_; |
15
|
|
|
|
|
|
|
my $post = $orig->($self); |
16
|
|
|
|
|
|
|
push @$post, app_id => $self->app_id; |
17
|
|
|
|
|
|
|
return $post; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 NAME |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Facebook::Graph::Publish::PageTab - Add a page tab. |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 VERSION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
version 1.1204 |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
my $fb = Facebook::Graph->new; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$fb->add_page_tab($page_id, $app_id)->publish; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 DESCRIPTION |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This module gives you quick and easy access to publish an app as a page tab. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
B<ATTENTION:> You must have the C<manage_pages> privilege to use this module. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 METHODS |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 app_id ( id ) |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Specify an app id for the app to add as the page tab. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 publish ( ) |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Posts the data and returns a L<Facebook::Graph::Response> object. The response object should contain the id: |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
{"id":"1647395831_130068550371568"} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 LEGAL |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Facebook::Graph is Copyright 2010 - 2012 Plain Black Corporation (L<http://www.plainblack.com>) and is licensed under the same terms as Perl itself. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |