Google Code offered in: English - Español - 日本語 - 한국어 - Português - Pусский - 中文(简体) - 中文(繁體)
The otherme method gives you an easy way to query a person's
other idenfitiers (e.g. URLs) based on one or more identifiers for that person
that you do know.
For instance, you might have a social networking site that asks
users for the URLs of their other social networking sites' URLs. The
user, though, might be bored of typing in their dozen some URLs into
each of their dozen some social networking sites. Instead of asking
them to do all this work, just ask the Social Graph API! Hit
the otherme with what you do know (their email address
and/or any URLs of theirs that they have entered, etc) and let the
Social Graph API recommend other URLs that the user can then select.
For instance, this is exactly what Google does itself
with Google
Profiles.
The otherme method is accessible with URLs like:
http://socialgraph.apis.google.com/otherme?<parameter 1>&<parameter 2>&<parameter n>
The follow is a summary of the available parameters:
| Parameter | Type | Short Description |
|---|---|---|
q |
Comma-separated list of URIs. | The identifiers (URLs, emails, etc) which you do know for the person. |
pretty |
boolean | Pretty-print returned JSON. |
jscb |
String matching /^[\w\.]+$/ | JSONP callback function. |
sgn |
boolean | Return internal representation of nodes. More... |
Imagine you know your user is bob@example.com and has
URL http://example.com/user/bob. You'd do a request
like:
http://socialgraph.apis.google.com/otherme?q=bob@example.com,http://example.com/user/bob&pretty=1
And the response would look like:
{
"http://example-bob.livejournal.com/": {
"attributes": {
"atom": "http://example-bob.livejournal.com/data/atom",
"foaf": "http://example-bob.livejournal.com/data/foaf",
"rss": "http://example-bob.livejournal.com/data/rss",
"fn": "Mr. Example Bob",
"url": "http://example-bob.livejournal.com/",
"profile": "http://example-bob.livejournal.com/profile"
}
},
"http://twitter.com/example_bob": {
"attributes": {
"atom": "http://twitter.com/statuses/user_timeline/example_bob.atom",
"rss": "http://twitter.com/statuses/user_timeline/example_bob.rss",
"url": "http://twitter.com/example_bob",
"profile": "http://twitter.com/example_bob"
}
},
"mailto:bob@other.example.com": {
"attributes": {
}
},
"xmpp:bobf@example.com": {
"attributes": {
}
}
}
The response object's keys are URLs that you didn't request. Each returned URL may have attributes as well.