Home > Articles > Web Development

  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Using the Facebook Information

Using the Facebook Information

After the user has connected your application with Facebook, you can use the Facebook API to access numerous Facebook features. By far the easiest operation is the display of the user's picture and name, using the FBML tags fb:profile-pic and fb:name. To display the user's Facebook photo and name in a DIV frame, use the following HTML and FBML tags:

<div id="userData">
  <fb:profile-pic uid='loggedinuser' size='normal'
    facebook-logo='true'></fb:profile-pic><br />
  <fb:name uid='loggedinuser' useyou='false'></fb:name>
</div>

The FBML tags are automatically rendered by the FBML part of the Facebook Connect library whenever the user's logged-in status changes. Thus, the user's data displayed on your web page will always reflect her Facebook profile.

  • + Share This
  • 🔖 Save To Your Account