Facebook Developers
DocsToolsSupportNewsApps
Log In
  • Social Plugins
    • Like Button
    • Send Button
    • Follow Button
    • Comments
    • Activity Feed
    • Recommendations Box
    • Recommendations Bar
    • Like Box
    • Login Button
    • Registration
    • Facepile
  • Facebook Login
  • Open Graph
  • Facebook APIs
  • Games
  • Payments
  • App Center
  • Promote Your App
  • iOS
  • Android
  • JavaScript
  • PHP
  • More SDKs
  • Plugins
    • Activity Feed
    • Comments
    • Facepile
    • Follow Button
    • Like Box
    • Like Button
    • Login Button
    • Recommendations Bar
    • Recommendations Box
    • Registration
    • Send Button
    • Share Dialog
    • Shared Activity
    • fb:name
    • fb:profile-pic
  • Beta Plugins
    • Migrations
      • Subscribe Button

    fb:name

    Renders the name of the user specified, optionally linked to his or her profile.

    This also works for Facebook Pages with the ID of the Page passed as the uid parameter. You can use this tag for both the subject and the object of a sentence describing an action. For example, if a user with the user ID ''$tagger'' tags a photo of a user with the user ID ''$tagee'', you could say:

    <fb:name uid="$tagger" capitalize="true" /> tagged a photo
    of <fb:name subjectid="$tagger" uid="$tagee" />
    

    User names and profile links follow standard Facebook privacy rules for other viewing users.

    Attributes

    • uid - The ID of the user or Page whose name you want to show. Alternately, you can use "profileowner" only on a user's profile; you can use "loggedinuser" only on canvas pages.
    • firstnameonly - Show only the user's first name. Default value is false
    • linked - Link to the user's profile. Default value is true
    • lastnameonly - Show only the user's last name. Default value is false
    • capitalize - Capitalize the text if useyou is true and loggedinuser is uid. Default value is false
    • subjectid - The Facebook ID of the subject of the sentence where this name is the object of the verb of the sentence. Will use the reflexive when appropriate. When ''subjectid'' is used, ''uid'' is considered to be the object and ''uid'''s name is produced.
    • possessive - Make the user's name possessive (e.g. Joe's instead of Joe). Default value is false.
    • reflexive - Use "yourself" if useyou is true. Default value is false.
    • shownetwork - Displays the primary educational network for the uid, if applicable. Other networks do not show. Default value is false.
    • useyou - Use "you" if uid matches the logged in user. Default value is true.
    • ifcantsee - Alternate text to display if the logged in user cannot access the user specified. To specify an empty string instead of the default, use ifcantsee="". Default value is Facebook User
    Updated about 10 months ago
    Facebook © 2013 · English (US)
    AboutAdvertisingCareersPlatform PoliciesPrivacy Policy