API-Facebook
view release on metacpan or search on metacpan
% cpanm API::Facebook
If you are installing into a system-wide directory, you may need to pass the
"-S" flag to cpanm, which uses sudo to install the module:
% cpanm -S API::Facebook
## Installing with the CPAN shell
Alternatively, if your CPAN shell is set up, you should just be able to do:
% cpan API::Facebook
## Manual installation
As a last resort, you can manually install it. Download the tarball, untar it,
then build it:
% perl Makefile.PL
% make && make test
README.mkdn view on Meta::CPAN
functionality. Please read the documentation for API::Client for more usage
information.
# ATTRIBUTES
## access\_token
$facebook->access_token;
$facebook->access_token('ACCESS_TOKEN');
The access\_token attribute should be set to an API access token associated with
your account.
## identifier
$facebook->identifier;
$facebook->identifier('IDENTIFIER');
The identifier attribute should be set to a string that identifies your app.
## debug
$facebook->debug;
$facebook->debug(1);
The debug attribute if true prints HTTP requests and responses to standard out.
## fatal
README.mkdn view on Meta::CPAN
$facebook->timeout(5);
The timeout attribute determines how long an HTTP connection should be kept
alive. This attribute defaults to 10.
## url
$facebook->url;
$facebook->url(Mojo::URL->new('https://graph.facebook.com'));
The url attribute set the base/pre-configured URL object that will be used in
all HTTP requests. This attribute expects a [Mojo::URL](https://metacpan.org/pod/Mojo::URL) object.
## user\_agent
$facebook->user_agent;
$facebook->user_agent(Mojo::UserAgent->new);
The user\_agent attribute set the pre-configured UserAgent object that will be
used in all HTTP requests. This attribute expects a [Mojo::UserAgent](https://metacpan.org/pod/Mojo::UserAgent) object.
# METHODS
## action
my $result = $facebook->action($verb, %args);
# e.g.
README.mkdn view on Meta::CPAN
## product\_item
$facebook->resource(param('product-item'));
The product\_item resource returns a new instance representative of the API
resource requested. This method accepts a list of path segments which will be
used in the HTTP request. The following documentation can be used to find more
information. [https://developers.facebook.com/docs/graph-api/reference/product-item](https://developers.facebook.com/docs/graph-api/reference/product-item).
## product\_set
$facebook->resource(param('product-set'));
The product\_set resource returns a new instance representative of the API
resource requested. This method accepts a list of path segments which will be
used in the HTTP request. The following documentation can be used to find more
information. [https://developers.facebook.com/docs/graph-api/reference/product-set](https://developers.facebook.com/docs/graph-api/reference/product-set).
## promotion\_info
$facebook->resource(param('promotion-info'));
The promotion\_info resource returns a new instance representative of the API
resource requested. This method accepts a list of path segments which will be
used in the HTTP request. The following documentation can be used to find more
information. [https://developers.facebook.com/docs/graph-api/reference/promotion-info](https://developers.facebook.com/docs/graph-api/reference/promotion-info).
lib/API/Facebook.pm view on Meta::CPAN
functionality. Please read the documentation for API::Client for more usage
information.
=head1 ATTRIBUTES
=head2 access_token
$facebook->access_token;
$facebook->access_token('ACCESS_TOKEN');
The access_token attribute should be set to an API access token associated with
your account.
=head2 identifier
$facebook->identifier;
$facebook->identifier('IDENTIFIER');
The identifier attribute should be set to a string that identifies your app.
=head2 debug
$facebook->debug;
$facebook->debug(1);
The debug attribute if true prints HTTP requests and responses to standard out.
=head2 fatal
lib/API/Facebook.pm view on Meta::CPAN
$facebook->timeout(5);
The timeout attribute determines how long an HTTP connection should be kept
alive. This attribute defaults to 10.
=head2 url
$facebook->url;
$facebook->url(Mojo::URL->new('https://graph.facebook.com'));
The url attribute set the base/pre-configured URL object that will be used in
all HTTP requests. This attribute expects a L<Mojo::URL> object.
=head2 user_agent
$facebook->user_agent;
$facebook->user_agent(Mojo::UserAgent->new);
The user_agent attribute set the pre-configured UserAgent object that will be
used in all HTTP requests. This attribute expects a L<Mojo::UserAgent> object.
=head1 METHODS
=head2 action
my $result = $facebook->action($verb, %args);
# e.g.
lib/API/Facebook.pm view on Meta::CPAN
=head2 product_item
$facebook->resource(param('product-item'));
The product_item resource returns a new instance representative of the API
resource requested. This method accepts a list of path segments which will be
used in the HTTP request. The following documentation can be used to find more
information. L<https://developers.facebook.com/docs/graph-api/reference/product-item>.
=head2 product_set
$facebook->resource(param('product-set'));
The product_set resource returns a new instance representative of the API
resource requested. This method accepts a list of path segments which will be
used in the HTTP request. The following documentation can be used to find more
information. L<https://developers.facebook.com/docs/graph-api/reference/product-set>.
=head2 promotion_info
$facebook->resource(param('promotion-info'));
The promotion_info resource returns a new instance representative of the API
resource requested. This method accepts a list of path segments which will be
used in the HTTP request. The following documentation can be used to find more
information. L<https://developers.facebook.com/docs/graph-api/reference/promotion-info>.
( run in 0.815 second using v1.01-cache-2.11-cpan-49f99fa48dc )