|
|
|
Webfinger is an HTTP based protocol whose aim is to discover information on resources represented by an email like identifier. More details on this protocol can be found [[here | http://code.google.com/p/webfinger/wiki/WebFingerProtocol]].
|
|
|
|
|
|
|
|
## lookup(identifier, callback);
|
|
|
|
|
|
|
|
Perform a lookup on an acct: uri identifier and return a JSON representation of the resource XRD.
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
var Ostatus = require('ostatus');
|
|
|
|
Ostatus.webfinger.lookup("acct:eschnou@identi.ca", function(err, result) {
|
|
|
|
console.log(util.inspect(result));
|
|
|
|
};
|
|
|
|
|
|
|
|
Will output:
|
|
|
|
|
|
|
|
{
|
|
|
|
subject: 'acct:eschnou@identi.ca',
|
|
|
|
alias:
|
|
|
|
[ 'http://identi.ca/user/16106',
|
|
|
|
'http://identi.ca/eschnou' ],
|
|
|
|
links:
|
|
|
|
[ { href: 'http://identi.ca/eschnou',
|
|
|
|
type: 'text/html',
|
|
|
|
rel: 'http://webfinger.net/rel/profile-page' },
|
|
|
|
{ href: 'http://identi.ca/eschnou/hcard',
|
|
|
|
type: 'text/html',
|
|
|
|
rel: 'http://microformats.org/profile/hcard' }
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
|