The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.


Net::Social::Service - the base package for all the Net::Social plugins


    my $service = Net::Social->service('LiveJournal');


    my $service = Net::Social::Service::LiveJournal->new;

Get the params needed

    my %params = Net::Social::Service::LiveJournal->params;

or my %params = $service->params;

    for my $what (qw(read write)) {
        print "Can $what\n" if $params{$what};

    # list what keys are needed to login    
    foreach my $key (keys %$params{read}) {
        print "$key: ".$params{read}->{$key}."\n";



    foreach my $friend ($service->friends) {
        print "$friend->{name} $friend->{type}\n";



Create a new Service


What fields are needed to log in to this service.

This will return a hash ref, the keys of which will be either read or write or one of each. If you log in using the write params you will also be able to read.

Each of those will, in turn, be a hash ref the keys of which described what is needed. In turn their values will be another hash ref which can contain the fields


Always present. A description of the field.


Defaults to 0. Dictates whether this field is required or optional.


Defaults to 0. Whether or not this field is sensitive or not.

By sensitive we mean that it compromises the user's account. Examples of this might be, say, a password as opposed to a authorisation token.

This is a bit of a judgment call, to be honest.

login <params>

Login in to this site.


All your friends on the site.

The friends will be return as a list of hash refs.

The hash refs will contain various fields depending on the service returning the data such as name (the person's full name), uid (the uid on the service), username (a username on the service, may be the same as uid). However each one will definitely contain type which will be one of 4 values, defined as constants in Net::Social.


There's no defined relationship between the two of you.


You've friended them but they haven't friended you.


They've friended you but you haven't friended them.


You've both friended each other. MUTUAL is defined as


In the future I may make all services return a key field or similar which will be the field needed for adding or deleting.

add_friend <username>

Add a friend.

remove_friend <username>

Remove a friend.

3 POD Errors

The following errors were encountered while parsing the POD:

Around line 100:

You forgot a '=back' before '=head2'

Around line 134:

Unknown directive: =over4

Around line 136:

'=item' outside of any '=over'