Name

<fb:user-table/>

Synopsis

<fb:user-table><fb:user-item/><fb:user-item/>...</fb:user-table>

Renders a list of users, specified as <fb:user-item/> tags within the tags. Each <fb:user-item/> tag renders a thumbnail for the specified user, with a linked name for that user appearing to the right of the thumbnail. Look at the Mutual Friends section on each profile page for a good example of what this looks like.

FBML-Specific Attributes

Required

None.

Optional

cols=[int] defaults: 3 (for narrow column), 6 (for wide column)

The number of columns in the user table.

Example FBML

The <fb:user-table/> tag simply contains a list of <fb:user-item/> tags, as shown in the following example (see the <fb:user-item/> tag described next for more details):

<fb:user-table>
  <fb:user-item uid="683545112"/>
  <fb:user-item uid="4"/>
  <fb:user-item uid="7403766"/>
</fb:user-table>

Rendered HTML for Single Instance of Tag

When rendered, an <fb:user-table/> box on a user’s profile will produce HTML that looks like this (Figure 3-10 shows the result):

<table class="friendTable" cellpadding="0" cellspacing="0" border="0" 
    height="100%">
<tr>
<td >
  <table height="100%">
  <tr>
    <td height="100%" style="vertical-align: middle;">
      <a href="http://www.facebook.com/profile.php?id=683545112">
          <img src="http://profile.ak.facebook.com/profile5/623/6/
              t683545112_5427.jpg" 
          alt=""  class="" /></a>
    </td>
  </tr>
  <tr>
    <td>
      <a href="http://www.facebook.com/profile.php?id=683545112">
          Jesse Stay</a>
    </td>
  </tr>
  </table>
</td>
<td >
  <table height="100%">
  <tr>
    <td height="100%" style="vertical-align: middle;">
      <a href="http://www.facebook.com/s.php?k=100000080&id=4">
          <img src="http://profile.ak.facebook.com/profile5/1240/77/
              t4_65.jpg" 
          alt=""  class="" /></a>
    </td>
  </tr>
  <tr>
    <td>
      <a href="http://www.facebook.com/s.php?k=100000080&id=4">
          Mark Zuckerberg</a>
    </td>
  </tr>
  </table>
</td>
<td >
  <table height="100%">
  <tr>
    <td height="100%" style="vertical-align: middle;">
      <a href="http://www.facebook.com/profile.php?id=7403766">
          <img src="http://profile.ak.facebook.com/profile5/1161/15/
              t7403766_2745.jpg"
          alt=""  class="" /></a>
    </td>
  </tr>
  <tr>
    <td>
      <a href="http://www.facebook.com/profile.php?id=7403766">
          Nick ONeill</a>
    </td>
  </tr>
  </table>
</td>
<td >
  <table height="100%"></table>
</td>
<td >
  <table height="100%"></table>
</td>
<td >
  <table height="100%"></table>
</td>
</tr>
</table>
The result of our <fb:user-table/> example
Figure 3-10. The result of our <fb:user-table/> example

Additional Information

  • As with all tags in this section, <fb:user-table/> can be used only a user’s profile, nowhere else.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.188.121