#!perl
use strict;
use warnings;
use WWW::Facebook::API::Simple;

my $client = WWW::Facebook::API::Simple->new(
    desktop        => 1,
    format         => 'JSON',
    throw_errors   => 1,
    parse_response => 0,        # uses JSON::XS if set to 1
);

my $token = $client->auth->create_token;

# prompts for login credentials from STDIN
$client->login->login($token);
$client->auth->get_session( auth_token => $token );

use Data::Dumper;
my $friends_json = $client->friends->get;
print Dumper $friends_json;

my $notifications_json = $client->notifications->get;
print Dumper $notifications_json;

# Current user's quotes
my $quotes_json = $client->users->get_info(
    uids   => [ $client->session_uid ],
    fields => ['quotes']
);
print Dumper $quotes_json;

$client->auth->logout;
