NAME
Net::SocialGraph - interact with Google's Social Graph API
SYNOPIS
my $sg = Net::SocialGraph->new(%options); # see below
my $res = $sg->get(@urls);
DESCRIPTION
This is a paper thin wrapper round Google's Social Graph API.
http://code.google.com/apis/socialgraph/
You should read the docs there for more information about options and the format of the response.
METHODS
new [opt[s]]
Create a new Social Graph object.
Can optionally take, err, some options.
- edo (boolean)
-
Return edges out from returned nodes.
- edi (boolean)
-
Return edges in to returned nodes.
- fme (boolean)
-
Follow me links, also returning reachable nodes.
- pretty (boolean)
-
Pretty-print returned JSON.
- callback (string matching /^[\w\.]+$/)
-
JSONP callback function.
You shouldn't ever have to use this but I put it in for completeness.
- sgn (boolean)
-
Return internal representation of nodes.
get <uri[s]>
Fetch the information about the nodes specified in the uris.
Returns a nested data structure representing the results. This will be in the form of a hashref.
The key canonical_mapping
contains another hashref which maps each uri given to its canonical form.
The key nodes
contains a hashref with keys for each uri given. The contents of those hashrefs (do keep up) depend on the options given.
You can read more information about node uris here
http://code.google.com/apis/socialgraph/docs/api.html#query
get_json <uri[s]>
The same as above but returns raw JSON.
AUTHOR
Simon Wistow <simon@thegestalt.org>
COPYRIGHT
Copyright 2008, Simon Wistow
Distributed under the same terms as Perl itself.