Database Reference
In-Depth Information
fetch additional data on them from their other public proiles. For example, if you retrieve a loc-
ation, real name, portrait, or description from an external service, you can use it to prepopulate
your own “create a proile” page. You can ind open source code examples demonstrating how
to use most of these APIs at
http://github.com/petewarden/indbyemail
, and there's a live web
WebFinger is a uniied API that you can use to discover additional information about a person
based on his or her email address. It's very much focused on the discovery protocol, and it
AOL
.
You can also see
PHP source code demonstrating how client code can call the protocol
.
It's a REST interface, it returns its results in XML format, and it doesn't require any authentica-
tion or keys to access.
As a widely used service, the Flickr REST/XML API is a great source of information on email
addresses. You'll see a location, real name, and portrait for people with public proiles, and you'll
be able to suggest linking their Flickr accounts with your own site. You'll need to
register as a
developer
before you can access the interface:
curl "http://api.flickr.com/services/rest/?\
method=flickr.people.findByEmail&api_key=<key>&find_email=tim%40oreilly.com"
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<user id="36521959321@N01" nsid="36521959321@N01">
<username>timoreilly</username>
</user>
</rsp>
curl "http://api.flickr.com/services/rest/?\
method=flickr.people.getInfo&api_key=<key>&user_id=36521959321@N01"
<?xml version="1.0" encoding="utf-8" ?>
<rsp stat="ok">
<person id="36521959321@N01" nsid="36521959321@N01"
ispro="1" iconserver="1362" iconfarm="2" path_alias="timoreilly">
<username>timoreilly</username>
<realname>Tim O'Reilly</realname>
<location>Sebastopol, CA, USA</location>
<photosurl>http://www.flickr.com/photos/timoreilly/</photosurl>
<profileurl>http://www.flickr.com/people/timoreilly/</profileurl>