WWW::F...k::API(3pm)
WWW::Facebook::API π
okay bestie, welcome to the perl side of Facebook. this is the manual page for the module WWW::Facebook::API (it lives in the User Contributed Perl Documentation section, if you're keeping score) β¨
β¨ VERSION β¨
This doc β and all its little sibling docs that ship with the module β are describing WWW::Facebook::API version 0.4.18. no cap. π
πΈ SYNOPSIS πΈ
here's the whole vibe, in code, because code is the love language:
use WWW::Facebook::API;
# @ENV{qw/WFA_API_KEY WFA_SECRET WFA_DESKTOP/} are the initial values,
# so use those if you only have one app and don't want to pass in values
# to constructor
my $client = WWW::Facebook::API->new(
desktop => 0,
api_key => 'your api key',
secret => 'your secret key',
);
# Change API key and secret
print "Enter your public API key: ";
chomp( my $val = <STDIN> );
$client->api_key($val);
print "Enter your API secret: ";
chomp($val = <STDIN> );
$client->secret($val);
# not needed if web app (see $client->canvas->get_fb_params)
$client->auth->get_session( $token );
use Data::Dumper;
my $friends_perl = $client->friends->get;
print Dumper $friends_perl;
my $notifications_perl = $client->notifications->get;
print Dumper $notifications_perl;
# Current user's quotes
my $quotes_perl = $client->users->get_info(
uids => $friends_perl,
fields => ['quotes']
);
print Dumper $quotes_perl;
$client->auth->logout;
so yeah, you build a client, maybe swap the keys mid-flight, grab a session, and then just... call methods on it like it's nothing. friends, notifications, users β it's giving organized. π¦
π DESCRIPTION π
A Perl implementation of the Facebook API, built off of the canonical Java and PHP implementations. By default it uses JSON::Any to parse whatever the Facebook server hands back. There's also an option to get the raw response in either XML or JSON instead (peep the parse method further down π). And like the synopsis said, these environment variables are what set the defaults for brand-new instances:
WFA_API_KEY
WFA_SECRET
WFA_SESSION_KEY
WFA_DESKTOP
Also β for every single instance you create, these env vars get used when no values have been set:
WFA_API_KEY_APP_PATH
WFA_SECRET_APP_PATH
WFA_SESSION_KEY_APP_PATH
WFA_DESKTOP_APP_PATH
where APP_PATH gets swapped out for whatever $client->app_path returns, with every non-alphanumeric character turned into an underscore and every character upcased. so like, foo-bar-baz becomes FOO_BAR_BAZ. periodt. π
π SUBROUTINES/METHODS π
new( %params )
Returns a fresh new instance of this class. π«Ά You can pass in any of the attribute method names that live in WWW::Facebook::API to set their values, like so:
my $client = WWW::Facebook::API->new(
parse => 1,
format => 'JSON',
secret => 'application_secret_key',
api_key => 'application_key',
session_key => 'session_key',
session_expires => 'session_expires',
session_uid => 'session_uid',
desktop => 1,
api_version => '1.0',
callback => 'callback_url',
next => 'next',
popup => 'popup',
skipcookie => 'skip_cookie',
throw_errors => 1,
);
$copy = $client->new;
and yes, that last line is doing exactly what it looks like β you can call new on an instance and get a copy. iconic behavior, honestly. π
β¨ NAMESPACE METHODS β¨
okay bestie listen up π every single method name that comes from the Facebook API is lower_cased instead of CamelCase. that's the whole vibe. no CamelCase, we don't do that here. π
admin
the admin namespace of the API (See WWW::Facebook::API::Admin). π
application
the application namespace of the API (See WWW::Facebook::API::Application). π
auth
for desktop apps, these two are literally synonymous, like same energy, same result:
$client->auth->get_session( $client->auth->create_token );
$client->auth->get_session;
and that's genuinely all you have to do (but see WWW::Facebook::API::Auth for the deets about opening a browser on *nix for Desktop apps). get_session automatically sets session_uid, session_key, and session_expires for $client. it returns nothing. that's it, that's the whole thing. π
if the desktop attribute is set to false, then the $token must be the auth_token that Facebook handed back to your web app for that user:
if ( $q->param('auth_token') ) {
$client->auth->get_session( $q->param('auth_token') );
}
get_session automatically sets session_uid, session_key, and session_expires for $client. it returns nothing. yes we said that already, it's important, it's giving consistency β¨
See WWW::Facebook::API::Auth for details. π¦
canvas
work with the canvas, bestie. See WWW::Facebook::API::Canvas. π¨
$response = $client->canvas->get_user( $q )
$response = $client->canvas->get_fb_params( $q )
$response = $client->canvas->get_non_fb_params( $q )
$response = $client->canvas->validate_sig( $q )
$response = $client->canvas->in_fb_canvas( $q )
$response = $client->canvas->in_frame( $q )
comments
the comments namespace of the API (See WWW::Facebook::API::Comments). π¬
connect
the connect namespace of the API (See WWW::Facebook::API::Connect). π
data
the data namespace of the API (See WWW::Facebook::API::Data). and again, all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->data->set_cookie( uid => 23, qw/name foo value bar/);
$cookies = $client->data->get_cookies(
uid => 4534,
name => 'foo',
);
events
the events namespace of the API (See WWW::Facebook::API::Events). and you guessed it, all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->events->get(
uid => 'uid',
eids => [@eids],
start_time => 'utc',
end_time => 'utc',
rsvp_status => 'attending|unsure|declined|not_replied',
);
$response = $client->events->get_members( eid => 233 );
fbml
the fbml namespace of the API (See WWW::Facebook::API::FBML). and yes, all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->fbml->set_ref_handle( handle => '', fbml => '');
$response = $client->fbml->refresh_img_src( url => '');
$response = $client->fbml->refresh_ref_url( url => '');
feed
the feed namespace of the API (See WWW::Facebook::API::Feed). all method names from the Facebook API are lower_cased instead of CamelCase, iconic behaviour fr fr:
$response
= $client->feed->publish_story_to_user(
title => 'title',
body => 'markup',
...
);
$response
= $client->feed->publish_action_of_user(
title => 'title',
body => 'markup',
...
);
$response
= $client->feed->publish_templatized_action(
actor_id => 'title',
title_template => 'markup',
...
);
fql
the fql namespace of the API (See WWW::Facebook::API::FQL):
$response = $client->fql->query( query => 'FQL query' );
friends
the friends namespace of the API (See WWW::Facebook::API::Friends). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->friends->get;
$response = $client->friends->get_app_users;
$response
= $client->friends->are_friends( uids1 => [1,5,8], uids2 => [2,3,4] );
$response = $client->friends->get_lists;
groups
the groups namespace of the API (See WWW::Facebook::API::Groups). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->groups->get( uid => 234324, gids => [2423,334] );
$response = $client->groups->get_members( gid => 32 );
intl
the intl namespace of the API (See WWW::Facebook::API::Intl). π
links
the links namespace of the API (See WWW::Facebook::API::Links). π
livemesssage
the liveMesssage namespace of the API (See WWW::Facebook::API::LiveMesssage). π (yes the spelling is like that, we don't make the rules, we just document them π)
message
the message namespace of the API (See WWW::Facebook::API::Message). βοΈ
notes
the notes namespace of the API (See WWW::Facebook::API::Notes). π
notifications
the notifications namespace of the API (See WWW::Facebook::API::Notifications). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->notifications->get;
$response = $client->notifications->send(
to_ids => [ 1, 3 ],
notification => 'FBML notification markup',
);
$response = $client->notifications->send_email(
recipients => [1, 2343, 445],
subject => 'subject',
text => 'text version of email body',
fbml => 'fbml version of email body',
);
pages
the pages namespace of the API (See WWW::Facebook::API::Pages). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->pages->get_info(
page_ids => [@pages],
fields => [@fields],
uid => 'user',
type => 'page type',
);
$page_added_app = $client->pages->is_app_added( page_id => 'page' );
$is_admin = $client->pages->is_admin( page_id => 'page' );
$is_fan = $client->pages->is_fan( page_id => 'page', uid => 'uid' )
permissions
the permissions namespace of the API (See WWW::Facebook::API::Permissions). π
photos
the photos namespace of the API (See WWW::Facebook::API::Photos). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->photos->add_tag(
pid => 2,
tag_uid => 3,
tag_text => "me",
x => 5,
y => 6
);
$response = $client->photos->create_album(
name => 'fun in the sun',
location => 'California',
description => "Summer '07",
);
$response = $client->photos->get( aid => 2, pids => [4,7,8] );
$response = $client->photos->get_albums( uid => 1, pids => [3,5] );
$response = $client->photos->get_tags( pids => [4,5] );
$response = $client->photos->upload(
aid => 5,
caption => 'beach',
data => 'raw data',
);
profile
the profile namespace of the API (See WWW::Facebook::API::Profile). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->profile->get_fbml( uid => 3 );
$response = $client->profile->set_fbml( uid => 5,
profile => 'markup',
profile_action => 'markup',
mobile_profile => 'markup',
);
sms
the sms namespace of the API (See WWW::Facebook::API::SMS). π±
status
the status namespace of the API (See WWW::Facebook::API::Status). π«Ά
stream
the stream namespace of the API (See WWW::Facebook::API::Stream). π
users
the users namespace of the API (See WWW::Facebook::API::Users). all method names from the Facebook API are lower_cased instead of CamelCase:
$response = $client->users->get_info(
uids => 2343,
fields => [ qw/about_me quotes/ ]
);
$uid = $client->users->get_logged_in_user;
$response = $client->users->has_app_permission(
ext_perm => 'status_update|photo_upload'
);
$app_added = $client->users->is_app_user;
$response = $client->users->set_status(
status => 'status message',
clear => 1|0,
);
video
the video namespace of the API (See WWW::Facebook::API::Video). π¬
π ATTRIBUTE METHODS π
These are the methods that get and set your object's attributes, bestie. It's giving "settings panel but make it Perl." π
api_key( $new_api_key )
Your developer API key. If $ENV{'WFA_API_KEY'} is set, then literally every instance gets initialized with its value. Go read the Facebook API documentation for more deets. β¨
api_version( $new_version )
Which version you wanna use β the default is "1.0", which is the latest one supported currently, periodt. This corresponds to the argument "v" that gets passed into methods as a parameter. π¦
app_id()
The application id for where your Facebook app is described, like:
http://www.facebook.com/apps/application.php?id=THIS_NUMBER
And remember, WWW::Facebook::API is not that clairvoyant π β you have to set this number first (when you call new()) before you can use it. No skipping steps.
app_path()
If you're using the Facebook canvas, this is the path to your application. So if your app lives at http://apps.facebook.com/example/, this should be example. Simple as that. πΈ
apps_uri()
The apps uri for Facebook apps. The default is http://apps.facebook.com/. π
callback( $new_default_callback )
The callback URL for your application. See the Facebook API documentation. It's honestly just a convenient place holder for the value, no cap. π
call_success( $is_success, $error_message )
Takes in two values β the first one sets the object's last_call_success attribute, and the second one sets the object's last_error attribute. Returns an array reference holding last_call_success and last_error, in that exact order:
my $response = $client->call_success( 1, undef );
if ( $response->[0] == 1 ) {
print 'Last call successful';
}
if ( not defined $response->[1] ) {
print 'Error message is undefined';
}
$client->call_success( 0,'2: The service is not available at this time.');
$response = $client->call_success;
if ( not $response->[0] ) {
print 'Last call unsuccessful';
}
if ( not defined $response->[1] ) {
print "Error $response->[1]";
}
The call method calls this method for you, so you shouldn't need to call it to set anything β just to grab the value later if throw_errors is false. iykyk π«Ά
config($filename)
Used when you're instantiating a new object, to set the environment variables. The file has a simple, BASH-style format:
WFA_API_KEY_MYAPP=383378efa485934bc
WFA_SECRET_MYAPP=234234ac902f340923
WFA_SESSION_KEY_MYAPP=34589349abce989d
WFA_DESKTOP_MYAPP=1
If the file is found and the environment variables are already set, then the variables will not be changed. Respect the existing vibe. π
debug(0|1)
A boolean, true or false, that determines whether debugging messages should be carped for REST calls. Defaults to 0. π
desktop(0|1)
A boolean signifying whether the client is being used for a desktop application. If $ENV{'WFA_DESKTOP'} is set, every instance gets initialized with its value. Otherwise it defaults to 0. See the Facebook API documentation for more. π»
format('JSON'|'XML')
The default format to use if none is supplied with an API method call. Currently available options are XML and JSON. Defaults to JSON. Slay. β
last_call_success(1|0)
A boolean, true or false, showing whether the last call was successful or not. Called by call_success. Defaults to 1. π
last_error( $error_message )
A string holding the error message from the last failed call to the REST server. Called by call_success. Defaults to undef. π
next( $new_default_next_url )
See the Facebook API documentation's Authentication Guide. Just a convenient place holder for the value. π§
parse(1|0)
Defaults to 1. If it's set to true, the response returned by each method call will be a Perl structure (peep each method to see the structure it returns). If it's set to 0, the response string from the server gets returned instead. (And that response string is unescaped if the 'desktop' attribute is false.) π
popup( $popup )
See the Facebook API documentation's Authentication Guide. Just a convenient place holder for the value. β¨
query( $query )
Stores the current query object to use (either CGI or Apache::Request) β but honestly anything that implements the param() method works. N.B. When you're using the require_* methods below, Apache::Request will croak because it does not implement a redirect method. π
Heads up bestie β thatcroakis real. If you're onApache::Requestand you hit thoserequire_*methods, it's over.
secret( $new_secret_key )
For a desktop application, this is the secret used for calling auth->create_token and auth->get_session. For a web application, secret is used for all calls to the API. If $ENV{'WFA_SECRET'} is set, all instances get initialized with its value. See the Facebook API documentation under Authentication for more info. π
server_uri( $new_server_uri )
The server uri used to access the Facebook REST server. Default is 'http://api.facebook.com/restserver.php'. It's used to make calls to the Facebook server, and it's super useful for testing. See the Facebook API documentation. π
session_expires( $new_expires )
The session expire timestamp for the client's user. Automatically set when $client->auth->get_session is called. See the Facebook API documentation. β°
session_key( $new_key )
The session key for the client's user. Automatically set when $client->auth->get_session is called. See the Facebook API documentation. π
session_uid( $new_uid )
The session's uid for the client's user. Automatically set when $client->auth->get_session is called. See the Facebook API documentation. π
skipcookie(0|1)
See the Facebook API documentation's Authentication Guide. Just a convenient place holder for the value. πͺ
throw_errors(0|1)
A boolean, true or false, signifying whether or not to "confess" when an error gets returned from the REST server. π¨
ua
The LWP::UserAgent agent used to communicate with the REST server. The agent_alias is initially set to "Perl-WWW-Facebook-API/0.4.18". π€
π PUBLIC METHODS π
call( $method, %args )β this is THE one, bestie. It's the method every other submodule insideWWW::Facebook::APIuses to actually call the Facebook REST interface. You hand it a string that says which method you want (like'auth.getSession') plus key/value pairs for the parameters:
$client->call( 'auth.getSession', auth_token => 'b3324235e' );
Heads up for every single call: if parse is set to true and Facebook hands back an empty hash or array reference, you get nothing back instead of that empty hash/array ref. Little glow-up, no cap.
generate_sig( params => $params_hashref, secret => $secret )β makes you a sig when you give it a params hash ref and a secret key. β¨get_add_url( %params )β gives you back the URL for adding your app, with whatever params you passed baked in. And yes, the API key and the API version params get auto-added, you don't have to do a thing. If you pass in thenextparameter, it gets string-escaped. This one's for platform applications:
$response = $client->get_add_url( next => 'http://my.website.com' );
# prints http://www.facebook.com/app.php?api_key=key&v=1.0
# &next=http%3A%2F%2Fmy.website.com
print $response;
get_app_urlβ returns the URL to your application if you're doing the Facebook canvas thing. It uses$client->app_path, which you have to set yourself (peepapp_pathbelow, bestie).get_facebook_url( $subdomain )β returns the URL to Facebook. You can specify a specific network as the parameter:
$response = $client->get_facebook_url( 'apps' );
print $response; # prints http://apps.facebook.com
get_infinite_session_url()β returns the URL where the user can generate an infinite session for your app:
$response = $client->get_infinite_session_url;
# prints http://www.facebook.com/codegen.php?api_key=key&v=1.0
print $response;
Okay so from what the author's seen, the session keys Facebook sends back don't expire automatically β so as long as you never call $client->auth->logout, you lowkey don't even need to stress about this one. π
get_login_url( %params )β returns the URL to log in to your application, with the params (that are defined) included. Pass innextand it gets string-escaped:
$response = $client->get_login_url( next => 'http://my.website.com' );
# prints http://www.facebook.com/login.php?api_key=key&v=1.0
# &next=http%3A%2F%2Fmy.website.com
print $response;
get_url( $type, @args )β this is the one all thoseget_*_urlmethods above call behind the scenes, main character energy.$typecan be'login','app','add','facebook','infinite_session', or'custom'.@argsholds the query parameters for the cases where$typeis not'app'or'facebook'. When$typeis'custom', the first item in@argsis the url path relative to the facebook website. Every single one of theget_*_urlmethods lines up with the ones in the official PHP client. π«Άlog_string($params_hashref, $response)β drop in the params and the response from a call, and it builds you a formatted string showing the parameters used and the response received.redirect( $url, $query_object )β called byrequire()to send the user along, either inside the canvas or outside it. If no$query_objectis defined, then whatever lives in$client->querygets used. (See WWW::Facebook::API::Canvas.) If no redirect is needed, nothing is returned β that's the only case where there's no return value at all. If a redirect is needed, there are two cases it handles:- user not logged in β if there's no user logged into Facebook's system, it prints a redirect to the Facebook login page to STDOUT, with a
nextparameter pointing at the appropriate page. That redirect is called using the CGI module that ships standard with perl. Return value here is1. - user logged in β if the user is logged in to Facebook and a redirect is required, you get the necessary FBML back:
"<fb:redirect url="WHATEVER">". So the return value is that FBML, which you can then print to STDOUT. πΈ
- user not logged in β if there's no user logged into Facebook's system, it prints a redirect to the Facebook login page to STDOUT, with a
require_add( $query )β redirects the user to whateverget_add_url()returns. For the$queryparameter, scroll torequire()below.require_frame( $query )β redirects the user to whateverget_login_url( canvas = '1' )returns. For$query, again,require()below.require_login( $query )β redirects the user to whateverget_login_url()returns.$query? You already know.require()below. πrequire( $what, $query )β the official PHP client has a bunch ofrequire_*methods that take no arguments at all. Logically you already know what you want to require when you call each of them, so this API smushes them all into one method. Valid values for$whatare'add','frame', and'login'.$queryis the query object to use (most likely CGI). If$queryis undefined, the value of$client->queryis used instead.session( uid => $uid, key => $session_key, expires => $session_expires )β setsuser,session_key, andsession_expiresall in one go. Efficiency queen. β¨unescape_string($escaped_string)β hands back its parameter with all the escape sequences unescaped. If you're running a web app, this happens to the response automatically, so you don't even have to think about it.verify_sig( sig => $expected_sig, params => $params_hashref )β checks the signature for a given set of parameters against an expected value.
π PRIVATE METHODS π
Okay bestie, these are the internals. Don't come for them unless you know what you're doing, fr fr.
_add_url_params( %params )β called by bothget_login_urlandget_add_urlto process any of their parameters. It prepends the api_key and the version number as parameters, then returns the parameter string._check_values_of($params_hashref)β makes sure all the values of the$params_hashrefthat need to be set actually are set. For any value that's needed but not supplied, it uses the defaults._format_and_check_params( $method, %args )β formats the method parameters (given in%args) according to the Facebook API specification. Returns a list of items: a hash reference of the newly formatted params (based on%params), plus the raw data (and filename, if one was passed in) if the call is a photo or video upload:
($params, $raw_data, $filename) = $self->_format_and_check_params( $method, %args );
_has_error_response( $response )β figures out whether the response is an error, and logs it appropriately. Returns true if the response is an error, false otherwise.is_empty_response( $response )β figures out whether the response is an empty hash or array reference. Returns true if the response is empty, false otherwise._post_request( $params_hashref, $sig, $raw_data, $filename )β used bycallto post the request off to the REST server and return the response.$raw_dataand$filenamecome into play when you're uploading a photo or video to Facebook._parse($string)β parses the response from a call to the Facebook server so it becomes a Perl data structure, then returns the result._parser()β returns a fresh new instance ofJSON::Any. Baby parser. π_reformat_response( $params, $response )β reformats the response depending on whether the app is a desktop app, whether the response should be parsed (i.e. turned into a Perlish structure), whether the response is empty, etc. Returns the reformatted response.
π DIAGNOSTICS π
Unable to load JSON module for parsing: %sβJSON::Anycouldn't load one of the JSON modules it uses to parse JSON. Please make sure you've got one (of the several) JSON modules it can use installed.Error during REST call: %sβ this most likely means there's an error in the server you're using to talk to the Facebook REST server. Look at the traceback to figure out why an error was thrown. Double-check thatserver_uriis set to the right location.Cannot create namespace %s: %sβ can't create the needed subclass method. Contact the developer to report it.Cannot create attribute %s: %sβ can't create the needed attribute method. Contact the developer to report it._format_and_check_params must be called in list context!β you're calling a private method and you're not calling it in list context. It returns a list of items and every single one of them should be interesting to you.Cannot open %sβ can't open the configuration file. Make sure the filename is correct and that the program has the appropriate permissions.Cannot close %sβ can't close the configuration file. Make sure the filename is correct and that the program has the appropriate permissions.
π FAQ π
Id numbers returned by Facebook are being rounded. What is the problem?
The JSON module installed on your system is converting the numbers to Perl and losing precision while it does it. π Make sure you've got the latest JSON::XS module installed, or JSON::DWIW β any recent version of either one should work.
How do I run the examples in the examples directory?
There are two types of examples in the examples directory: desktop-based and web-based.
With desktop-based, the api key and secret key are prompted for on STDIN, and then the user's browser gets opened and pointed at the Facebook log in page. Currently, the desktop-based examples pause for 20 seconds to give the user time to enter in their credentials.
With web-based, you have to pass in the api key, secret key, and app path to the constructor, and then place the script at the callback url you specified in the Facebook setup for your application. Like, when you're using the web-based example, you might have this callback url (note the trailing slash, bestie):
http://www.example.com/facebook-canvas-json/
You have to make sure the required Perl modules are in the @INC path for the web server process, otherwise you'll get a 500 Internal Server error. Easiest way to do that is to stick this at the top of the example script (as long as path-to-perl5-libs is readable by the web server process):
use lib "path-to-perl5-libs";
I'm getting the "Multiple values for %s" error from WFA::Canvas. Help?
This usually means your forms are using GET rather than POST to Facebook URLs. Change your forms to use POST and the problem should be resolved. (See RT#31620 and RT#31944 for more information.)
πΈ CONFIGURATION AND ENVIRONMENT πΈ
WWW::Facebook::API requires no configuration files or environment variables. Clean. Minimal. Iconic. π
β DEPENDENCIES β
version Crypt::SSLeay Digest::MD5 JSON::Any Time::HiRes LWP::UserAgent
π¦ INCOMPATIBILITIES π¦
None. We're unbothered. π«Ά
π BUGS AND LIMITATIONS π
okay so, plot twist: no bugs have been reported. not one. zero. the bug tracker is sitting there looking pretty, hydrated, moisturized, in its lane, unbothered. β¨
but bestie, if you do find something (or you're just craving a feature like it's a limited-edition lip oil), please report it:
- email your bug reports and feature requests to
bug-www-facebook-api@rt.cpan.orgπ«Ά - or slide into the web interface at <http://rt.cpan.org> β that's the whole URL, type it, don't be shy
π SOURCE REPOSITORY π
the source is right here, go wild:
http://github.com/unobe/perl-wfa/tree/master
clone it, read it, fork it, stare at it lovingly at 3am. it's giving open source main character energy. π
π§ͺ TESTING π§ͺ
so there are some live tests in here (iconic), but they will only run if you set these environment variables first:
WFA_API_KEY_TEST
WFA_SECRET_TEST
WFA_SESSION_KEY_TEST
no vars, no tests. that's the vibe check. π
bonus round: if your app is a desktop one, you've also gotta set WFA_DESKTOP_TEST. and heads up β the session key has to actually be valid for the API key you're using. like, they have to match. they have to be in their matching era. π
want more test coverage in your life?
- set
PERL_TEST_PODto true β enables the POD coverage and POD formatting tests π - set
_PERL_TEST_CRITICto true β enables thePerl::Critictests π
(yes, that second one has a leading underscore. it's quirky like that. respect it.)
π AUTHOR π
David Romano <unobe@cpan.org> β the originator, the blueprint, the moment. π
π«Ά CONTRIBUTORS π«Ά
the whole squad, no gatekeeping, everyone ate:
- Anthony Bouvier
none - Clayton Scott
http://www.matrix.ca - David Leadbeater
http://dgl.cx - Derek Del Conte
derek@delconte.org - Gisle Aas
none - J. Shirley
<jshirley@gmail.com> - Jim Spath
<jspath@gmail.com> - Kevin Riggle
none - Larry Mak
none - Louis-Philippe
none - Matt Sickler
<imMute@mail.msk3.ath.cx> - Nick Gerakines
<nick@socklabs.com> - Olaf Alders
<olaf@wundersolutions.com> - Patrick Michael Kane
<pmk@wawd.com> - Ryan D Johnson
ryan@innerfence.com - Sean O'Rourke
<seano@cpan.org> - Shawn Van Ittersum
none - Simon Cavalletto
<simonm@cavalletto.org> - Skyler Clark
none - Thomas Sibley
<tsibley@cpan.org>
literal legends, every single one. π
π LICENSE AND COPYRIGHT π
Copyright (c) 2007-2010, David Romano <unobe@cpan.org>. All rights reserved.
this module is free software β you can redistribute it and/or modify it under the same terms as Perl itself. see perlartistic for the receipts. π¦
π¨ DISCLAIMER OF WARRANTY π¨
okay bestie, this is the part where the lawyers start yelling in all caps and honestly? they're right to. read it, feel it, accept it. π
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.
translation: it's free, so it comes as-is, no promises, and the entire risk situation? that's yours. if it breaks, the repair bill is also yours. sorry babe. π
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENSE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
and that one means: unless the law forces it or someone signed something, nobody gets blamed for damages β general, special, incidental, consequential, data loss, data rendered inaccurate, losses sustained by you or third parties, or the software refusing to play nice with other software. even if they were literally warned it could happen. that's the whole deal, that's the contract, periodt. β¨
that's the whole page, bestie!! you made it to the end, i'm so proud, this is your graduation ππΈ
this version of the page is from perl v5.34.0 and it was last updated on 2022-06-28 β so if you're reading this way in the future, hi, you're doing amazing, go check for a newer release. π
mwah. go write some Perl. π«Άπ β¨
π¦ where this page comes from
- debian bookworm: libwww-facebook-api-perl 0.4.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libwww-facebook-api-perl 0.4.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libwww-facebook-api-perl 0.4.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libwww-facebook-api-perl 0.4.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libwww-facebook-api-perl 0.4.18-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms