How To - Access a User's List of Friends
From The Socknet
A user's list of friends can be accessed and used to enhance the user's experience using a separate website or friend's profile.
Some users restrict access to this list. Certain friends will be public and others will only be included in the list under certain conditions, such as if the requester is a registered service or a friend.
Contents |
The Function
A user's list of friends may be accessed via the friends function.
The results is a set of "friendship objects" which are very similar to the results of the profile function.
Generally this data will be less complete than a call to profile. For example, generally email addresses are not provided via friends.
Relationships
A friendship object can include a relationships field holding an array of strings. It should be possible to insert these strings into the sentence "Friend is a ____ of User".
The following sentences could be made from the example at friends:
(Assuming the example was a call to http://user.com.)
http://friend3.com is a friend of http://user.com. http://mrleroy_thief.com is a spouse of http://user.com. http://mrleroy_thief.com is a business partner of http://user.com.
The strings in this field may be anything.
Standard Entries for the Relationships Field
The following are standard, but they are not the only options.
Anyone may introduce a new option simply by using it.
All items added to this standard list will be in English. If there is no English form of a word, a word may be introduced from another language. If that concept is found in other languages, they should use the standard entry (ie, there should be one word chosen from one of the languages that has the concept).
All entries are genderless, because the user's sex is expressed by the user. Items that have no genderless form in English use the masculine form by default.
- friend (because some Socknet friends are just acquaintances)
- coworker
- relative (should be present if "spouse", "child", etc is present)
- spouse
- child
- parent
- grandchild
- grandparent
- great-grandchild (beginning with any number of "great-" prefixes)
- great-grandparent
- sibling
- cousin
- uncle
- nephew
This list will expand forever. At some point it will become necessary to review items before they get on the list. But for now, go wild.
isa
The isa field contains an array of strings. This field is identical to the one in User Data, but remember that this information has not been verified with the user it describes. It indicates what the responding user thinks about the user described.
verified
The verified field indicates that the user has received some kind of proof that the friend is not an impostor. This should be 100% certainty, such as through a personal meeting and verification of the user's OpenID or a phone call. Since humans are fallible and not always bright (and because no official method of verification has been specified), the only suggested use for this information is in telling other users "User A feels certain that User B is not an impostor."
Considerations
A provider may refuse to give any data in response to the GET call, instead requiring a service or friend to identify itself using from.
When someone makes friends, this function is usually called immediately. It's a good idea to make the data available before friending someone is complete (ie, avoid race conditions).
Providers should make users aware of which of their friendships are world readable.
No mechanism exists for requesting that a friend keep your friendship private. One may be created. Still, it should be understood that users have full control over whether or not to call you a friend.
If their server permits it, they may even call you a friend without your knowledge or consent (not recommended).
There can be no enforcement of this data. Such is the way of the Internet.
The images option makes it possible for a friend to "track" another friend's activity. If this is a concern, it is easily mitigated by copying the file(s) to the Socknet provider.
In order to avoid becoming an unwitting pawn in some kind of crazy data smuggling scheme, the provider should only pass familiar fields in the friend objects. IE, it should not simply copy all data from profile to each user object.

