Leah Culver (leahculver.com)
Please send feedback to leah@megatechtronium.com
Django-PSN provides users of a social website to provide and display information about their other online social networks. The project was created to let Pownce users show their friends what other online social networks they participate in. The hyperlinks to other profiles make use of the XFN rel="me" standard, which enables auto-discovery of social network profiles which the user has chosen to consolidate into a single identity. Hopefully it's also parsable by Plaxo's Online Identity Consolidator.
In addition, Django-PSN provides a JSON response with the user's claimed URLs and friend/fan relationships (represented as user ids for graph edges in and edges out). An example can be found at /interface/elsewhere_info with params id=user_id or indent=username.
You can try this out live, with my profile, at Pownce: http://pownce.com/interface/elsewhere_info?ident=leahculver
I copied this format from LiveJournal, guessing that it will be copied by other websites as well. I'm open to changing this format and updating Django-PSN accordingly.This data can be used to connect friends across online social networks, building a free social graph.
Add the following to your urlconf:
(r'^social_networks/$', 'psn.views.social_networks'), (r'^settings/social_networks/$', 'psn.views.settings_social_networks'),
For sample templates add the path to psn/templates to your TEMPLATE_DIRS setting.
There are two chunks of information considered interesting to social network portability:
Edges In and Out is application specific but fairly easy data to obtain for a site owner.
Identity URL assertions can be obtained through a GUI which can be mutually interesting to users and interesting to data collectors. Daniel Burka (Pownce designer) and I spent a lot of time thinking of how to gather these assertions from users. We decided that while online identities take one form to a data collector (a profile URL), users perceive online identity in three forms:
We really wanted Pownce users to get immediate positive feedback for providing Pownce with their online identities. Pownce users are not only contributing to social graph data, but are also displaying links and profile data on their application profiles for their friends.
Add the following to your urlconf:
(r'^interface/elsewhere_info/$', 'psn.views.elsewhere_info'),
Customize the elsewhere_info view in psn/views.py. Specifically, you will need to generate lists of edges in and edges out based on how your application handles friend relationships.
Given a numeric node id or node identifier, return JSON about the
user, optionally with all related edges.
GET /interface/elsewhere_info?id=234234 # unique userid
GET /interface/elsewhere_info?ident=brad # unique identifier (username / group name)
Host: www.elsewhere-cooperating-site.com
arguments:
id= # integer nodeid to query. this or 'ident' is required.
ident= # string identifier to query. this or 'id' is required.
want_edges=1 # optional: explicitly request/don't request edges_{in,out} (default whatever you want)
HTTP 200 OK
Content-Type: text/json # server isn't picky; can be whatever
{
"node_id": 239847283947,
"node_ident": "brad",
"node_type": {"person"|"group"|"openid"},
"mbox_sha1sum": "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15", # of "mailto:email@foo.com", ONLY IF email is verified
"claimed_urls": [
"mbox_sha1sum:f1d2d2f924e986ac86fdf7b36c94bcdf32beec15", # if not verified.
"http://facebook.com/profile?id=23423434",
"aim:bradfitzpatrick",
"http://bradfitz.com/",
],
"verified_urls": [ # ONLY if proven with OpenID / facebook auth, etc...
"http://facebook.com/profile?id=23423434",
}
"edges_out" : [ # all edges out, whether dest nodes are people _or_ groups.
1,
2,
5,
10,
],
"edges_in":[ # all edges out, whether source nodes are people _or_ groups.
8,
],
};