The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

Net::Social - abstracted interface for social networks

SYNOPSIS

use Net::Social qw(:all); # get constants
# What services are available
my @services = Net::Social->services;
# Fetch a handler for a service
my $service = Net::Social->service('LiveJournal');
# what fields are needed to login
my %params = $service->params;
foreach my $type (keys %params) {
print "To $type:\n"; # either read or write
foreach my $p (keys %$types{$type}) {
print $params{$type}->{$p}->{name}." : ".$params{$type}->{$p}->{description}."\n";
# also 'required' and 'sensitive'
}
}
# login - my_params must have the required fields from %params
$service->login(%my_params);
# now fetch your friends
my @friends = $service->friends;
# add a friend
$service->add_friend($friend);
# remove a friend
$service->remove_friend($friend);

CONSTANTS

Optionally exports the constants

NONE
FRIENDED
FRIENDED_BY
MUTUAL

Which describe the type of relationship with a friend.

It should be noted that

MUTUAL = FRIENDED | FRIENDED_BY;

but is provided for convenience.

METHODS

services

A list of all services available.

service <service name>

Fetch the class for a given service

Returns undef if that service isn't found.

AUTHOR

Simon Wistow <simon@thegestalt.org>

COPYRIGHT

Copyright, 2007 - Simon Wistow

Distributed under the same terms as Perl itself