Skip to content

Instantly share code, notes, and snippets.

@apparentlymart
Created December 5, 2015 20:17
Show Gist options
  • Save apparentlymart/cdee3b4f2140ba587722 to your computer and use it in GitHub Desktop.
Save apparentlymart/cdee3b4f2140ba587722 to your computer and use it in GitHub Desktop.
HTML Social Network

HTML Social Network

Back in July of 2008 I started thinking about HTML microformats for linking together and discovering social objects on the web.

I later discussed this with folks at the Internet Identity Workshop and after a few rounds of discussion we ended up working on Activity Streams instead, which shifted the focus to machine-readable descriptions of actions on social objects. However, the social object research here was the initial basis of what went on to become the "Object Types" in Activity Base Schema, after many iterations.

The original write-up I did of the HTML microformats is archived below. I am no longer pursuing this, and have just put it up here for reasons of my own nostalgia. This is exactly as it was originally written in 2008, with all the context that implied. I do not today hold all of the same opinions I held when I wrote this.

It is interesting to note the shift in perception and modelling of some of these objects since this document was written. This would seem to demonstrate, with the benefit of hindsight, the folly of attempting to encode a constantly-evolving cultural space in a machine-readable specification.


XFN has gained traction as a really simple way to mark up friend relationships in a machine-readable manner on the web, using nothing more than HTML.

Tools like Google's Social Graph API have made the open social graph accessible in a practical way that makes it genuinely useful for a number of use cases. Some would argue that XFN's success is due largely to the fact that it is non-disruptive and is easy to integrate into an existing system.

There's more to social networks than friendship edges, though. Today's social networking sites have a wealth of social objects beyond just people, including groups, photos, products and events. Some of these objects already have representations in open formats, such as hcalendar. What seems to be missing is an open standard for tying these things together.

This proposal attempts to build on the principles of XFN, along with other similar proposals in development, to allow a more complete picture of the social web to be described in a machine-readable way with minimal effort required on the part of the publisher of that information.

Design Principles

The main principle driving this proposal is simplicity. Just as with XFN and most microformats, it should be almost trivial to implement the extra attributes described here into your existing application.

The other principle is not to invent anything new aside from the markup: the proposals here are based on existing practice on popular social networks that exist today, including but not limited to Facebook and MySpace. The intention is simply to make existing links useful to software, not to invent additional relationships that do not exist on the social web today.

This proposal borrows from other existing or proposed microformats wherever possible.

While this is proposed as a single document, there is no reason why this proposal could not be split into a set of smaller proposals for independent consideration if desired.

Everything is a URI

The social web, by virtue of being a subset of the web, uses URIs to identify resources. The URL of a personal profile page acts as an identifier for the person it describes, for example.

It is an unfortunate but perhaps inevitable fact that anything that exists in the social world will have multiple URIs identifying it. Most people now have numerous profiles across various social services, and event listings get syndicated and shared across numerous social sites.

This proposal therefore extends the reach of XFN's rel="me" annotation to become a general clustering construct, with no assumption that the objects being clustered are of any particular type. Nodes that are linked together with rel="me" as described by XFN form "meta-nodes", which are nodes in a graph one level removed from the physical link graph that represent social objects rather than merely pages about social objects. The union of all edges of nodes in a meta-node become the edges of that meta-node. For many applications, the this "meta-graph" will be more interesting than the physical graph it is built from.

Expanding rel="me" for this purpose has the advantage that existing tools that perform meta-graph operations, such as Google's Social Graph API, can be used for the clustering step with no additional work required. Since producing a meta-graph from scratch is one of the more intensive operations as far as number of HTTP requests is concerned, being able to use these existing tools to perform this step is a useful starting point.

Note that "URI" here is not restricted to HTTP URLs. Other URI schemes can pose problems since many do not readily allow content to be published in order to create reciprocal links, but in certain circumstances it can be useful to create relationships to non-HTTP resources.

For the purposes of this proposal, only entire resources (i.e. pages) are considered. Only a URL that has as its top-level content an object is considered to be an identifier for that object. If a given object does not have a URL of its own, it cannot be considered in the terms of this proposal.

Paging

When there is a large number of edges leaving a particular object, it is often desirable to publish the list of links over multiple sub-pages. There is already a standard for declaring sequences of pages which can be used for this purpose, which is the use of the rel="next" and rel="prev" attributes. For the purposes of meta-node clustering, two pages can be considered to be clustered if page A publishes rel="next" to page B and page B publishes rel="prev" to page A, or vice-versa. Publishers may also wish to include rel="me" on such links, to support consumers that only understand that relationship.

Objects in the Social Web

The terms "social object" and "sharing device" have been coined to describe items that create ties between people in the social world. Most if not all social networks are based around one or more social objects, which form the basis around which people interact socially. For the purposes of this proposal, I will also consider people to be social objects, though this may not be true in a strict interpretation of the term.

The social graph, then, is a directed graph of social objects. The "type" of an object is largely determined by context: if a person attended or will attend something, it's probably an event. If a person is friends with something, it's probably another person. Some nodes in the graph have multiple types: a band can have members, making it a group, but it can also have fans, which could make it a product or service.

This proposal describes only a mechanism for creating attributed links between social objects represented by URLs and meta-nodes; other formats such as hCalendar provide a means for individual attributes of a social object to be extracted, so this proposal will leave the specifics of extracting the attributes of social objects to others.

People

Key Examples: just about every social networking site in existence

The social web is founded on people. Without people, it wouldn't be the social web. Several technologies have set the precedent for using URLs to represent people. XFN provided a way to easily declare inter-personal relationships between URLs, arguably setting the precedent that URLs could be used to represent people rather than just documents. Technologies such as OpenID and MicroId are also useful as technologies which allow users to prove "ownership" of a URL. Together these technologies provide a link between the real-world person and the pages that they have published about themselves.

Almost all of the graph edges described in this document are links between people and other people or between people and social objects.

Groups

Key Examples: just about every social networking site in existence

The concept of a group is a very broad one across the spectrum of social sites, but one thing they all have in common is that they have a set of people as members. The concept of group membership is bidirectional, and thus we must be careful to consider the membership relationship from the correct point of view: for many applications, it is likely that the group's links to its members will be treated as more authoritative than a person declaring membership of a group. Having the links in both directions allows applications to choose the most suitable way of interpreting this data for their use-case.

Groups of the sort encountered on most social networking sites also have creators and often other positions such as moderators or administrators. This proposal considers the concept of "creating" to be more general than just for groups, so this is excluded here. I also considered the variation in meaning of different group roles across different sites and decided to omit this for the moment until some orthogonal, well-defined roles can be identified that are applicable across a broad spectrum of social network sites.

Possible use-cases:

  • Groups of people who share a common interest.
  • Groups of people who have access to a particular resource.
  • Groups of people who work for a particular company.
  • Groups of people who hold a membership of a club.

Photographs

Key Examples: Flickr, Facebook, Panoramio, Zooomr

It seems that humans have been creating depictions of one another and the world around them in various media for as far as history can see, so it seems clear that taking photographs is a social activity. Most general social networks have some sort of photo-sharing functionality, but there are several social sites such as Flickr, Zoomr and Panoramio that are built primarily around photographs.

People both take photographs and appear in them. Objects other than people also appear in photographs and it may be useful to describe this relationship.

It appears from looking at examples on existing sites that people also indicate these relationships with other non-photograph depictions, including ones that are not accurate depictions of the related object. One specific example is the "Build your own Simpsons Character" site included as part of the promotional materials for The Simpsons Movie; many people created a Simpsons-like character resembling themselves and uploaded it to a social networking site indicating that it depicted them. However, social networking sites seem happy to use the word "photo" to describe these other depictions, so this proposal will do the same.

Some sites also have videos as social objects. If the video is a depiction of a person or another object then it can be considered in the same terms as a photograph for our purposes. In other contexts, such as simply sharing a funny video, it might be considered merely a Shared Bookmark, as described below.

It should be noted that when this proposal refers to "photographs" it generally means web pages containing or representing photographs, not the actual image files themselves. Making actual media files discoverable is left for other specifications or proposals to define.

This proposal also omits any way to specify where a photograph was taken. Again, there doesn't seem to be any particular established practice for this.

Events

Key Examples: Eventful, Facebook, Last.fm

An event is the intersection of a place (whether physical or figurative) and a time. Events in the social web are generally the sort of event where people will meet up or share an experience. Since points in time are not (currently) represented by URLs, this proposal considers the time of an event to be an attribute rather than a relationship and thus defers to formats such as hCalendar for that. However, venues can be and often are represented by URLs, so being the host of an event is a relationship. People also attend and organise events.

Most social sites with events give users the option of saying that they might be attending an event. The concept of definitely attending indicates that the person certainly intends to attend, though of course might not actually attend in practice. The possible attendence relationship seems in practice to indicate that the user has not yet decided either way or, in some cases, the person does not wish to attend the event but doesn't wish to cause offense to the organiser(s).

A venue is, broadly speaking, a place where an event occurs. Depending on the nature of the event, the venue might be a particular place of business, a particular town, or perhaps even an entire country. For the purposes of this proposal though it must be something that can be identified by a URL. It is quite likely that a venue will also fall into the "Products and Services" category.

An organiser of an event is someone you might contact with questions regarding the event, as well a person who is responsible for some aspect of the event.

The meaning of all edges relating to events changes depending on whether the event is in the future, the present or the past.

Products and Services

Key Examples: Facebook, Last.fm, listal

It seems that Facebook was the first site to turn the general concept of products and services into a first-class social object. The Facebook manifestation of this is called "Pages" and allows profiles to be created for a wide variety of different items that people might buy, consume, experience, etc.

In most other cases a site will have specific sub-types of products and services as its social objects. Last.fm, for example, has bands/artists, venues, albums and tracks as social objects.

Most of the other social objects here can also be considered to products and services. An event could be considered a product, though one might also consider an ongoing sequence of events of a similar nature to be a product, such as an annual music festival. As noted before, a rock band might be considered to be both a group and a product. This object might be considered a general placeholder for numerous social objects such as books, movies, TV series, musicians, and so forth.

Given the design principle of not inventing anything new other than markup, this proposal does not describe a comprehensive set of relationships that can exist products and other objects. Instead, we consider only two relationships for products and services: a person can be a "fan" of a product, which implies that they make use of and/or endorse the product, and a person or group can be the "supplier" of a product. The "fan" relationship is a one-way relationship between the user and the endorsed product. The "supplier" relationship is two-way between a person or group and the product.

A future version of this proposal might include the notion of ratings or reviews, but the author does not feel that there is enough established practice with this to produce a suitably-general schema at this time.

Shared Bookmarks

Key Examples: del.icio.us, Ma.gnolia, Facebook

Since the social web is founded on the web, it's not surprising that users of the social web wish to share links to web pages with other people. Sites like del.icio.us and Ma.gnolia are centered around the idea of producing lists of bookmarks and sharing them with your friends. Facebook also allows this in a less prominent fashion by allowing users to "share items" either on their public profile or as attachments on messages to specific users.

A user sharing a bookmark is a one-way relationship between the user and the bookmark.

Articles and Weblog Entries

Key Examples: LiveJournal, Vox, Blogger, Facebook, MySpace

Some might argue that the earliest entrants to the social web were what we now call weblogs. Weblogs come in many forms, such as online diaries that describe the experiences of a person or group of people, ongoing commentary on an area of personal interest, and so forth. The common factor is that a person and/or group publishes a sequence of timestamped articles.

There has already been a lot of thought put into how to publish weblog-like structures on the web in a machine readable way. For the purposes of this proposal, we consider only the concept that a particular person or group published a given article. For all other edges related to weblogs and their articles, we defer to other specifications and proposals. Most notably, the concept of "a weblog" is not considered here since in most cases a weblog itself is conflated with its author as part of the author's meta-node. A future version of this specification might allow for weblogs as a distinct concept related to both people/groups and weblog entries.

Status Updates

Key Examples: Twitter, Pownce, Identi.ca, Facebook

Several sites allow users to publish free-text updates on what they are doing, thinking or experiencing. In some contexts this is referred to as "microblogging", due to its similarity to traditional blogging but with more consise or focused entries posted more frequently. Status Updates might be considered to be a special case of Weblog Entries, but this proposal treats the two as distinct concepts allowing publishers to decide which is most appropriate or to use both if desired.

Much as with weblog entries, this proposal only considers the concept that a particular person or group published a given status update.


Schema

Given that this proposal is all about links between items on the social web, it makes use of the rel attribute applied to either HTML a, area or link elements. Some existing consumers only support a elements and ignore area and link, so publishing these relationships as visible links is recommended for maximum compatibility with deployed software.

General

Some concepts are reused below for several

Authorship

This is an existing practice.

  • author: indicates that the object, which is a person or group, is the creator of the subject, a photograph.
  • made: indicates that the subject, which is a person or group, is the creator of the object, a photograph.

The author notes that the "made" relationship has been misinterpreted as being equivalent to "author" in many cases, possibly due to confusion with rev="made", so it may be necessary to find a new noun for this relationship to avoid misinterpreting existing content.

People

For the purposes of linking between people this proposal defers entirely to XFN. The only deviation from XFN is the broadening of rel="me" to become a generic clustering mechanism as described above.

URLs with incoming or outgoing XFN edges, other than rel="me", are considered to be people.

Groups

This section was based on the "XHTML Membership Format" proposal written by Eran Globen, though this is simplified for now to only consider membership of groups.

  • group-member: indicates that the object, a person, is a member of the subject, a group.
  • group: indicates that the subject, a person, is a member of the object, a group.

The author considers the "group" relationship here to be sub-optimal, as those who are not familiar with the meaning of the "rel" attribute are likely to confuse this with being merely a type, assuming that rel="group" means just "target is a group" rather than "target is a group of which this page is a member". A similar thing has happened with rel="feed", for example. A better noun is sought for this relationship.

Which of these relationships is considered authoritative depends on the application. If there is no clear bias, consumers should verify that both relationships are present.

Photographs

Note that as above "photograph" here really refers to any depiction of a person or object in any media, but "photograph" is used due to its prevelence on sites deployed today.

Depiction

This section is not based on any existing specification or proposal.

  • depiction: indicates that the subject, which is of any type, is depicted in the object, a photograph.
  • depicted: indicates that the object, which is of any type, is depicted in the subject, a photograph.

Which of these relationships is considered authoritative depends on the application. If there is no clear bias, consumers should verify that both relationships are present.

Taking of Photographs

The relationship of being the person who took a photograph is described via the general authorship relationship described above. Consumers must therefore not assume that the endpoint is a photograph without additional context.

Events

Attendence

This section is not based on any existing specification or proposal.

  • attended-event: indicates that the subject, a person, intends to attend, is attending or did attend the object, an event.
  • attendee: indicates that the object, a person, intends to attend, is attending or did attend the subject, an event.

The interpretation of these relationships changes depending on whether the indicated event is in the past, present or future. The means by which consumers discover when the event occured or will occur is left to other specifications and proposals.

The attended-event relationship is authoritative here. The attendee relationship is intended only for discovery and is not to be considered valid unless reciprocated with an attended-event link.

Venues

This section is not based on any existing specification or proposal.

  • hosted-event: indicates that the subject, a venue, intends to host, is hosting or has hosted the object, an event.
  • venue: indicates that the object, a venue, intends to host, is hosting or has hosted the subject, an event.

The interpretation of these relationships changes depending on whether the indicated event is in the past, present or future. The means by which consumers discover when the event occured or will occur is left to other specifications and proposals.

Which of these relationships is considered authoritative depends on the application. If there is no clear bias, consumers should verify that both relationships are present.

Organizers

This section is not based on any existing specification or proposal.

  • organized-event: indicates that the subject, a person or group, is organizing or did organize the object, an event.
  • event-organizer: indicates that the object, a person or group, is organizing or has organized the subject, an event.

The interpretation of these relationships changes depending on whether the indicated event is in the past, present or future. The means by which consumers discover when the event occured or will occur is left to other specifications and proposals.

Which of these relationships is considered authoritative depends on the application. If there is no clear bias, consumers should verify that both relationships are present.

Products and Services

Fans

This section is not based on any existing specification or proposal.

  • fan: indicates that the object, a person, is a fan of the subject, a product.
  • endorsed-product: indicates that the subject, a person, is a fan of the object, a product.

The endorsed-product relationship is authoritative here. The fan relationship is intended only for discovery and is not to be considered valid unless reciprocated with an endorsed-product link.

Suppliers

This section is not based on any existing specification or proposal.

  • product-supplier: indicates that the object, a person or group, is the vendor or supplier of the subject, a product.
  • supplied-product: indicates that the subject, a person or group, is the vendor or supplier of the object, a product.

Which of these relationships is considered authoritative depends on the application. If there is no clear bias, consumers should verify that both relationships are present.

Shared Bookmarks

This section is not based on any existing specification or proposal.

  • shared-bookmark: indicates that the subject, a person or group, wishes others to take a look at the object, which is of any type.

This is distinct from rel="bookmark", which is currently used to give a canonical URL or "permalink" for a given resource.

Articles and Weblog Entries

This section is not based on any existing specification or proposal.

  • published-article: indicates that the subject, a person or group, has published the object, an article or weblog entry.

This is used in conjunction with the generic authorship relationships described above. published-article implies made. In most cases, published-article should be reciprocated with author for the link to be considered valid. However, some consumers may allow a person to claim any article as their own without requiring the reciprocal link.

In most cases a status update will be published with some indication of the time at which it was created. The means of publishing this attribute is deferred to other specifications or proposals.

Status Updates

This section is not based on any existing specification or proposal.

  • status-update: indicates that the object, a status update, is a status update for the subject, a person or group.

This is used in conjunction with the generic authorship relationships described above. status-update implies made. status-update does not require any reciprocal link to be considered valid.

In most cases a status update will be published with some indication of the time at which it was created. The means of publishing this attribute is deferred to other specifications or proposals. A consumer that has determined the creation time of all of a person's status updates by some means might consider the most recent to be the "current" status, unless the most recent is over a certain age threshold.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment