Share - http://webintents.org/share

The share intent is designed to give applications the ability to offer a simple mechanism for sharing data from the current page.

An action that can handle share could be anything that the user has installed, including and not limited to social networks and email services.

The "Share" protocol is intended to be a lightweight sharing facility.

Registration

<intent
    action="http://webintents.org/share" 
    type="image/*" 
    href="share.html"
  />
action
Required. Must be http://webintents.org/share
type
Optional. Types are a filter
href
Optional. If specified, it will point to the action that is loaded when the user chooses the service. If undefined, use the current page.

Invocation

var intent = new WebKitIntent("http://webintents.org/share", "text/uri-list", location.href);
var onSuccess = function(data) { /* woot */ };
var onError = function(data) { /* boooo */ };

window.navigator.webkitStartActivity(intent, onSuccess, onError);

Try it!

Data Formats

Clients and services can only interact with each other if the both support the same intent AND the same data type. Data-types can be any arbitary string, but it is expected that client and service will pass the same data if they both agree to support the protocol.

Advisory data-schemes are described below based off MIME-Types or Activity Streams

image/*
[Blob] || [Data URI] || Blob || Data URI
audio/*
[Blob] || [Data URI] || Blob || Data URI
video/*
[Blob] || [Data URI] || Blob || Data URI
text/uri-list
[uri] || uri