Home | Index

SearchMonkey Guide

Personal Profiles and Social Networks

This section shows examples of how to represent personal profiles and social networks using the VCard and Friend-of-a-Friend vocabularies. More advanced profiles might use SearchMonkey Actions, SearchMonkey Media, and SearchMonkey Resume.

Components

To mark up a personal profile:

  • Initial declaration: Start with a dc:subject with a type of foaf:Person. If your profile includes address (VCard) information, add a type of vcard:VCard.

    <y:adjunct version="1.0" name="social" xmlns:y="http://search.yahoo.com/datarss/">
     <y:item rel="dc:subject">
      <y:type typeof="foaf:Person vcard:VCard">
    ...
  • Personal Names: Use foaf:name, and optionally vcard:fn. You may also break the name into a foaf:givenname and foaf:surname.

    <y:meta property="vcard:fn foaf:name">Peter Mika</y:meta>
    <y:meta property="foaf:givenname">Peter</y:meta>
    <y:meta property="foaf:surname">Mika</y:meta>

    Account names and usernames belong in a foaf:holdsAccount block, described below.

  • Age and Gender: Use foaf:age and foaf:gender. For birthdays, you may use vcard:bday to specify a full date with year in YYYY-MM-DD format, or foaf:birthday for only the month and day.

    <y:meta property="foaf:age">29</y:meta>
    <y:meta property="foaf:gender">male</y:meta>
    <y:meta property="vcard:bday">1978-10-05</y:meta>
    <y:meta property="foaf:birthday">10-05</y:meta>
  • URLs and Email Addresses: Use foaf:homepage to indicate the person's homepage, and optionally indicate the page as a vcard:url as well. A person may have multiple homepages. To differentiate between them, you can use more specific vocabulary terms such as foaf:weblog, foaf:workInfoHomepage, and foaf:schoolHomepage.

    For email addresses, use foaf:mbox. You can also provide checksums.

    <y:item rel="foaf:homepage vcard:url" resource="http://research.yahoo.com/Peter_Mika/"/>
    <y:item rel="foaf:homepage vcard:url" resource="http://www.cs.vu.nl/~pmika/"/>
    <y:item rel="foaf:weblog vcard:url" resource="http://petersblog/blog"/>
    <y:item rel="foaf:mbox" resource="mailto:pmika@hotmail.com"/>
    <y:meta property="foaf:mbox_sha1sum">ffe33bbe8be2a2123f0adb793e61a6d84ae9a739</y:meta>

    With the exception of the checksum, each email address or URL should be an <item>, with a resource pointing to the URI in question.

  • Online Accounts: For an IM account, specify the account name as a foaf:providername, where providername is one of:

    • icqChatID

    • msnChatID

    • aimChatID

    • jabberChatID

    • yahooChatID

    For example:

    <y:meta property="foaf:yahooChatID">serendipity588</y:meta>

    For a chat provider not listed above, or for some other kind of online account, create a foaf:holdsAccount block.

    <y:item rel="foaf:holdsAccount">
      <y:type typeof="foaf:OnlineAccount">
        <y:item rel="foaf:accountServiceHomepage" resource="http://www.linkedin.com"/>
        <y:meta property="foaf:accountName">5054019</y:meta>
      </y:type>
    </y:item>

    where the type can be one of:

    • foaf:OnlineAccount

    • foaf:OnlineChatAccount

    • foaf:OnlineEcommerceAccount

    • foaf:OnlineGamingAccount

  • Organizational Affiliations: For each organization the person belongs to, add a vcard:org block.

    <y:item rel="vcard:org">
      <y:type typeof="vcard:Organization">
        <y:meta property="vcard:organization-name">Yahoo!</y:meta>
        <y:meta property="vcard:organization-unit">Yahoo! Research Barcelona</y:meta>
      </y:type>
    </y:item>
  • Address and Telephone: Add the person's physical address using a vcard:Address block. The telephone number should lie outside the block and should conform to an international format.

    <y:item rel="vcard:adr">
      <y:type typeof="vcard:Address">
        <y:meta property="vcard:street-address">Ocata 1</y:meta>
        <y:meta property="vcard:locality">Barcelona</y:meta>
        <y:meta property="vcard:region">Catalonia</y:meta>
        <y:meta property="vcard:postal-code" datatype="xsd:integer">08003</y:meta>
        <y:meta property="vcard:country-name">Spain</y:meta>
      </y:type>
    </y:item>
    
    <y:meta property="vcard:tel">+34 93 542 1160</y:meta>

    If the address is not available in parsed form, use an rdfs:label to contain the address as a generic string:

    <y:item rel="vcard:adr">
      <y:item typeof="vcard:Address">
        <y:meta property="rdfs:label">Ocata 1, Barcelona, Catalonia, 08003, Spain</y:meta>
      </y:item>
    </y:item>

    If you have geolocation coordinates for the person, you can specify this information using both FOAF and VCard:

    <y:item rel="vcard:geo foaf:based_near">
      <y:meta property="vcard:latitude wgs84_pos:lat" datatype="xsd:float">41.384</y:meta>
      <y:meta property="vcard:longitude wgs84_pos:long" datatype="xsd:float" >2.184</y:meta>
    </y:item>
  • Friends: Add the person's using foaf:knows blocks. This block can contain most of the vocabulary terms used to describe the main person (the dc:subject). However, a typical foaf:knows block can be fairly minimal, since most of that person's information should reside at another URL.

    <y:item rel="foaf:knows">
      <y:meta property="foaf:name vcard:fn">Paul Tarjan</y:meta>
      <y:item rel="foaf:homepage vcard:url" resource="http://www.paulisageek.com"/>
      <y:item rel="foaf:weblog" resource="http://paulisageek.blogspot.com/"/>
    </y:item>
  • Actions: For actions that the user can perform that relate to the person, use the SearchMonkey Actions vocabulary. For example, to indicate links for adding the person as a friend and sending the person email:

    <y:item rel="action:addFriend" resource="http://www.example.org/addFriend?user=69921"/>
    <y:item rel="action:sendEmail" resource="http://www.example.org/sendEmail?user=69921"/>

Simple Social Profile Example

The following example is of a simple social profile, including the user's name, gender, email address, and one of the user's friends.

<y:adjunct version="1.0" name="social-simple" xmlns:y="http://search.yahoo.com/datarss/">
    <y:item rel="dc:subject">
        <y:type typeof="foaf:Person">
            <y:meta property="foaf:name">John Doe</y:meta>
            <y:meta property="foaf:gender">male</y:meta>
            <y:item rel="foaf:homepage" resource="http://www.joeisageek.com"/>
            <y:item rel="foaf:mbox" resource="mailto:johndoe@example.org"/>
            <y:item rel="foaf:weblog" resource="http://johnblog.example.org"/>
            <y:item rel="foaf:knows">
                <y:type typeof="foaf:Person">
                    <y:meta property="foaf:name">Jane Doe</y:meta>
                    <y:meta property="foaf:gender">female</y:meta>
                    <y:item rel="foaf:mbox" resource="mailto:janedoe@example.org"/>
                </y:type>
            </y:item>
        </y:type>
    </y:item>
</y:adjunct>

Advanced Social Profile Example

The following example is of a more complex social profile, including detailed contact information with VCard address data, resume information, and more.

<y:adjunct version="1.0" name="social-simple" xmlns:y="http://search.yahoo.com/datarss/">
	<y:item rel="dc:subject">
		<y:type typeof="foaf:Person vcard:VCard">

			<y:meta property="vcard:fn foaf:name">Peter Mika</y:meta>
			<!-- break up name into givenname and surname if possible -->
			<y:meta property="foaf:givenname">Peter</y:meta>
			<y:meta property="foaf:surname">Mika</y:meta>

			<y:meta property="foaf:age">29</y:meta>

			<!-- You can also specify birthday. vcard:bday is the full date, foaf:birthday is only month and day-->

			<y:meta property="vcard:bday">1978-10-05</y:meta>
			<y:meta property="foaf:birthday">10-05</y:meta>

			<y:item rel="vcard:org">
				<y:type typeof="vcard:Organization">
					<y:meta property="vcard:organization-name">Yahoo!</y:meta>
					<y:meta property="vcard:organization-unit">Yahoo! Research Barcelona</y:meta>
				</y:type>
			</y:item>

			<!-- List any number of email addresses or checksums -->
			<y:item rel="foaf:mbox" resource="mailto:pmika@hotmail.com"/>
			<y:meta property="foaf:mbox_sha1sum">ffe33bbe8be2a2123f0adb793e61a6d84ae9a739</y:meta>

			<y:meta property="foaf:gender">male</y:meta>

			<!-- Chat account  (one or more of
			# icqChatID
			# msnChatID
			# aimChatID
			# jabberID
			# yahooChatID-->
			<y:meta property="foaf:yahooChatID">serendipity588</y:meta>

			<!-- Any other chat account -->
			<y:item rel="foaf:holdsAccount">
				<y:type typeof="foaf:OnlineChatAccount">
					<y:item rel="foaf:accountServiceHomepage" resource="http://www.skype.com"/>
					<y:meta property="foaf:accountName">serendipity588</y:meta>
				</y:type>
			</y:item>

			<!-- Any other account -->
			<y:item rel="foaf:holdsAccount">
				<y:type typeof="foaf:OnlineChatAccount">
					<y:item rel="foaf:accountServiceHomepage" resource="http://www.linkedin.com"/>
					<y:meta property="foaf:accountName">5054019</y:meta>
				</y:type>
			</y:item>

			<y:item rel="vcard:adr">
				<y:type typeof="vcard:Address">
					<y:meta property="vcard:street-address">Ocata 1</y:meta>
					<y:meta property="vcard:locality">Barcelona</y:meta>
					<y:meta property="vcard:region">Catalonia</y:meta>
					<y:meta property="vcard:postal-code" datatype="xsd:integer">08003</y:meta>
					<y:meta property="vcard:country-name">Spain</y:meta>
				</y:type>
			</y:item>

			<!-- Both FOAF and vcard allow to specify geolocation -->
			<y:item rel="vcard:geo foaf:based_near">
				<y:meta property="vcard:latitude wgs84_pos:lat" datatype="xsd:float">41.384</y:meta>
				<y:meta property="vcard:longitude wgs84_pos:long" datatype="xsd:float"
				>2.184</y:meta>
			</y:item>


			<y:item rel="foaf:homepage vcard:url" resource="http://research.yahoo.com/Peter_Mika/"/>
			<y:item rel="foaf:homepage vcard:url" resource="http://www.cs.vu.nl/~pmika/"/>

			<!-- Provide phone in international format -->
			<y:meta property="vcard:tel">+34 93 542 1160</y:meta>

			<y:meta property="resume:summary">I'm a researcher at Yahoo! Research in Barcelona,
				Spain...</y:meta>

			<y:item rel="resume:education">
				<y:item rel="resume:position">
					<y:meta property="vcard:fn">Vrije Universiteit, Amsterdam</y:meta>
					<y:item rel="vcard:url" resource="http://www.vu.nl"/>
				</y:item>
				<y:item rel="resume:duration">
					<y:meta property="vcal:dtstart" datatype="xsd:date"/>
				</y:item>
			</y:item>

			<!-- Link to adding this user as a friend via a system -->
			<y:item rel="action:addFriend" resource="http://www.example.org/addFriend?user=69921"/>

			<!-- Link to sending an email to this user via a system -->
			<y:item rel="action:sendEmail" resource="http://www.example.org/sendEmail?user=69921"/>

			<!-- Any number of friends... -->
			<y:item rel="foaf:knows">
				<y:meta property="foaf:name vcard:fn">Paul Tarjan</y:meta>
				<y:item rel="foaf:homepage vcard:url" resource="http://www.paulisageek.com"/>
				<y:item rel="foaf:weblog" resource="http://paulisageek.blogspot.com/"/>
			</y:item>

			<!-- Link to photo set
			<y:item rel="rdfs:seeAlso" resource="...">
				<y:type typeof="media:PhotoSet" resource=".."></y:type>
			</y:item>
			
		-->
			<!-- See the following vocabularies for more properties you can use: 
			
			http://xmlns.com/foaf/spec/
			http://www.w3.org/2006/vcard/ns
			
		-->

		</y:type>
	</y:item>
</y:adjunct>