manual facebook fbml

159
facebook FBML Reference Guide Consolidated by: yapish.com Last updated: 03/10/2008

Upload: victor-estuvo-aqui

Post on 16-Jan-2015

5.130 views

Category:

Documents


0 download

DESCRIPTION

Manual de FBML creado por:yapish.com

TRANSCRIPT

  • 1. facebook FBML Reference GuideConsolidated by: yapish.comLast updated: 03/10/2008

2. facebook FBML Reference Guide Page 2 of 159Table of ContentsTable of Contents...................................................................................................................................................2FBML......................................................................................................................................................................5From Facebook Developers Wiki........................................................................................................................5Valid HTML Elements ........................................................................................................................................5Facebook tags ........................................................................................................................................................6Summary:.............................................................................................................................................................6User/Groups.........................................................................................................................................................6Fb:name...........................................................................................................................................................6Fb:user............................................................................................................................................................8Fb:pronoun......................................................................................................................................................9Fb:profile-pic.................................................................................................................................................10Fb:grouplink..................................................................................................................................................12Fb:networklink..............................................................................................................................................13Fb:is-in-network............................................................................................................................................14Fb:if-can-see..................................................................................................................................................15Fb:if-can-see-photo.......................................................................................................................................16Fb:if-is-app-user............................................................................................................................................17Fb:if-is-friends-with-viewer..........................................................................................................................18Fb:if-is-group-member..................................................................................................................................19Fb:if-is-user...................................................................................................................................................20Fb:if-user-has-added-app..............................................................................................................................21Deprecated Tags ................................................................................................................................................22Fb:userlink....................................................................................................................................................22Fb:if-is-own-profile.......................................................................................................................................23Profile-specific ..................................................................................................................................................24Fb:wide..........................................................................................................................................................24Fb:narrow......................................................................................................................................................25Fb:profile-action...........................................................................................................................................26Fb:user-table.................................................................................................................................................28Fb:user-item..................................................................................................................................................29Fb:subtitle......................................................................................................................................................30Visibility on Profile ...........................................................................................................................................33Fb:visible-to-owner.......................................................................................................................................33Fb:visible-to-user..........................................................................................................................................34Fb:visible-to-friends......................................................................................................................................35Fb:visible-to-app-users.................................................................................................................................36Fb:visible-to-added-app-users......................................................................................................................37Fb:visible-to-connection................................................................................................................................38Fb:18-plus.....................................................................................................................................................39Fb:21-plus.....................................................................................................................................................40Embedded media ...............................................................................................................................................41Fb:iframe.......................................................................................................................................................41Fb:photo........................................................................................................................................................42Fb:mp3..........................................................................................................................................................43Fb:swf............................................................................................................................................................44 www.yapish.com 3. facebook FBML Reference Guide Page 3 of 159Fb:flv.............................................................................................................................................................47Fb:silverlight.................................................................................................................................................48Tools ..................................................................................................................................................................49Fb:board........................................................................................................................................................49Fb:comments.................................................................................................................................................51Fb:friend-selector..........................................................................................................................................53Fb:google-analytics.......................................................................................................................................55Fb:if...............................................................................................................................................................57Fb:else...........................................................................................................................................................58Fb:mobile......................................................................................................................................................59Fb:multi-friend-input.....................................................................................................................................60Fb:random.....................................................................................................................................................62Fb:random-option.........................................................................................................................................63Fb:switch.......................................................................................................................................................64Fb:default......................................................................................................................................................65Fb:user-agent................................................................................................................................................66Fb:typeahead-input.......................................................................................................................................68Fb:typeahead-option.....................................................................................................................................70Misc....................................................................................................................................................................71Fb:js-string....................................................................................................................................................71Fb:fbml..........................................................................................................................................................73Fb:fbmlversion..............................................................................................................................................74Fb:redirect.....................................................................................................................................................75Fb:ref.............................................................................................................................................................76Fb:share-button.............................................................................................................................................78Fb:time..........................................................................................................................................................79Fb:title...........................................................................................................................................................80Fb:page-admin-edit-header..........................................................................................................................81Forms ................................................................................................................................................................82Fb:submit.......................................................................................................................................................82Message/Wall attachments ................................................................................................................................83Fb:attachment-preview..................................................................................................................................83Notifications and requests .................................................................................................................................86Fb:notif-subject.............................................................................................................................................86Fb:notif-page.................................................................................................................................................87Fb:notif-email................................................................................................................................................88Fb:req-choice................................................................................................................................................89Fb:request-form.............................................................................................................................................90Fb:multi-friend-selector................................................................................................................................97Fb:multi-friend-selector (condensed)............................................................................................................99Fb:request-form-submit...............................................................................................................................102Fb:application-name...................................................................................................................................103Status messages ...............................................................................................................................................104Fb:error.......................................................................................................................................................104Fb:explanation............................................................................................................................................105Fb:message..................................................................................................................................................107Fb:editor......................................................................................................................................................108Fb:editor-button...........................................................................................................................................110 www.yapish.com 4. facebook FBML Reference Guide Page 4 of 159 Fb:editor-buttonset......................................................................................................................................111 Fb:editor-cancel..........................................................................................................................................112 Fb:editor-custom..........................................................................................................................................113 Fb:editor-date..............................................................................................................................................114 Fb:editor-divider..........................................................................................................................................115 Fb:editor-month...........................................................................................................................................116 Fb:editor-text...............................................................................................................................................117 Fb:editor-textarea........................................................................................................................................118 Fb:editor-time..............................................................................................................................................119Page navigation ...............................................................................................................................................120 Fb:dashboard..............................................................................................................................................120 Fb:action.....................................................................................................................................................122 Fb:create-button..........................................................................................................................................124 Fb:help........................................................................................................................................................125 Fb:header....................................................................................................................................................126 Fb:mediaheader..........................................................................................................................................128 Fb:header-title.............................................................................................................................................129 Fb:owner-action..........................................................................................................................................130 Fb:tabs.........................................................................................................................................................131 Fb:tab-item..................................................................................................................................................132Dialog ..............................................................................................................................................................134 Fb:dialog.....................................................................................................................................................134 Fb:dialog-title..............................................................................................................................................136 Fb:dialog-content........................................................................................................................................137 Fb:dialog-button..........................................................................................................................................138Wall .................................................................................................................................................................139 Fb:wall........................................................................................................................................................139 Fb:wallpost..................................................................................................................................................140 Fb:wallpost-action......................................................................................................................................141Dynamic FBML attributes................................................................................................................................142Summary..........................................................................................................................................................142Details..............................................................................................................................................................142 DynamicFBML/Visibility.............................................................................................................................142 DynamicFBML/MockAJAX.........................................................................................................................144 DynamicFBML/Forms.................................................................................................................................145 Requirelogin................................................................................................................................................146 FBJS............................................................................................................................................................147Usage notes ........................................................................................................................................................156Invalid CSS attributes ......................................................................................................................................157See also ...............................................................................................................................................................158External links.....................................................................................................................................................159www.yapish.com 5. facebook FBML Reference GuidePage 5 of 159FBMLFrom Facebook Developers WikiJump to: navigation, searchFacebook Markup Language (FBML) enables you to build full Facebook Platform applications that deeplyintegrate into a users Facebook experience. You can hook into several Facebook integration points, includingthe profile, profile actions, Facebook canvas, News Feed and Mini-Feed.FBML is an evolved subset of HTML with some elements removed, and others which have been added that arespecific to Facebook. You set the FBML for a profile box by calling profile.setFBML through the API. TheFBML is cached on Facebooks server until profile.setFBML is called again through a canvas page. For a high-level technical spec for FBML, please see FBMLspec.Valid HTML Elementsa fieldsetoltextareaabbrfontoptgrouptfootacronym formoptionthaddress h1p theadb h2pre trbdo h3q ttbig h4s ublockquoteh5sampulbrh6scriptvarcaption hrselectcenteri smallciteimg spancodeinput strikeddins strongdel kbd styledfn label subdiv legendsupdllitabledtlinktbodyemmetatd www.yapish.com 6. facebook FBML Reference GuidePage 6 of 159Facebook tagsSummary: User/Groups Deprecated Tags Profile-specific Visibility on Profile Embedded media Tools Misc Forms Message/Wall attachments Notifications and requests Status messages Editor display Page navigation Dialog WallUser/GroupsFb:nameDescriptionRenders 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 userwith the user ID $tagger tags a photo of a user with the user ID $tagee, you could say: tagged a photo of AttributesRequired NameType Descriptionrequired uid uidThe ID of the user or Page whose name you want to show. You can also use"loggedinuser" or "profileowner".optional firstnameonly bool Show only the users first name. (default value is false) linkedbool Link to the users profile. (default value is true) lastnameonly boolShow only the users last name. (default value is false)www.yapish.com 7. facebook FBML Reference Guide Page 7 of 159 possessive bool Make the users name possessive (e.g. Joes instead of Joe). (default value is false) reflexivebool Use "yourself" if useyou is true. (default value is false) shownetwork boolDisplays the primary network for the uid. (default value is false) useyou bool Use "you" if uid matches the logged in user. (default value is true) ifcantseestring Alternate text to display if the logged in user cannot access the user specified. (default value is [empty string]) capitalize bool Capitalize the text if useyou==true and loggedinuser==uid. (default value is false) subjectiduidThe 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 uids name is produced.ExamplesWhen logged in as user 1160: = himself = you = Josh Gibson = yourself = your own tagged a photo of See AlsoYou can see a real world example of this tag in all three demo applications (Footprints, Restaurants and WhosShowing Up). Go to Demos for more details and to download and install the demo apps.www.yapish.com 8. facebook FBML Reference GuidePage 8 of 159Fb:userDescriptionForces the enclosed content to be restrained to site privacy checks[verify] based on the viewer of theinformation. The content within the tag "belongs" to the user specified.Note: This tag does not appear to work at all when I test it, it does nothing. See bug report number 404.AttributesRequired Name TypeDescriptionrequired uidint The user ID of the user whose information will be contained in the tag.Examples This is user 12345s information. It should only be shown to people who can see user 12345. www.yapish.com 9. facebook FBML Reference GuidePage 9 of 159Fb:pronounDescriptionRenders a pronoun for a specific user.AttributesRequired NameType Descriptionrequired uid intThe user ID for whom to generate the pronoun. You can substitute actor for theuser ID so you can more easily aggregate feed stories.optional useyoubool Use the word "you" if uid is viewing the page. (default value is true) possessive boolUse the possessive form (his/her/your/their). (default value is false) reflexive bool Use the reflexive form (himself/herself/yourself/themselves). (default value isfalse) objective bool Use the objective form (him/her/you/them). (default value is false) usethey bool Use "they" if gender is not specified. (default value is true) capitalize boolForce a capital letter for the pronoun. (default value is false)Examples www.yapish.com 10. facebook FBML Reference GuidePage 10 of 159Fb:profile-picDescriptionTurns into an img tag for the specified users or Facebook Pages profile picture. The tag itself is treated like astandard img tag, so attributes valid for img are valid with fb:profile-pic as well.AttributesRequired Name Type Descriptionrequired uid intThe user ID of the profile or Facebook Page for the picture you want to display.optional sizestring The size of the image to display. (Default value is thumb). Other valid values arethumb (t) (50px wide), small (s) (100px wide), normal (n) (200px wide), and square(q) (50px by 50px). linked boolMake the image a link to the users profile. (default value is true)ExamplesSee AlsoYou can see a real world example of this tag in all three demo applications (Footprints, Restaurants and WhosShowing Up). Go to Demos for more details and to download and install the demo apps.www.yapish.com 11. facebook FBML Reference GuidePage 11 of 159Fb:eventlinkDescriptionPrints the specified event name and formats it as a link to the events page.AttributesRequiredName Type DescriptionrequiredeidintEvent ID for the event whose name and link you want to retrieve.Examples www.yapish.com 12. facebook FBML Reference GuidePage 12 of 159Fb:grouplinkDescriptionPrints the specified group name and formats it as a link to the groups page.AttributesRequiredName TypeDescriptionrequiredgidint Group ID for the group whose name and link you want to retrieve.Examples www.yapish.com 13. facebook FBML Reference Guide Page 13 of 159Fb:networklinkDescriptionPrints the specified network name and formats it as a link to the networks page.AttributesRequired Name Type Descriptionrequired nidintNetwork ID for the network whose name and link you want to retrieve.Exampleswww.yapish.com 14. facebook FBML Reference Guide Page 14 of 159Fb:is-in-networkDescriptionDisplays content inside the tag only if the user is in a given network.Note: You can use fb:else with fb:is-in-network, even though the tag does not start with fb:if-.AttributesRequiredName Type DescriptionrequirednetworkintThe network ID to check. You can check one network at a time.optionaluidintThe user ID to check. (default value is loggedinuser)ExamplesUser 1230541, you are in the network!NotesThis tag renders content on canvas pages and for notifications and feed stories. It doesnt work withprofiles, email and notifications.You can use the fb:networklink FBML to display the name/link of the network. www.yapish.com 15. facebook FBML Reference GuidePage 15 of 159Fb:if-can-seeDescriptionDisplays the enclosed content if the logged in user can see the specified what attribute of the specified user.You can use these settings to provide content or links with relevance to Facebook privacy or to implement yourown privacy using Facebooks current controls.You can use this tag in conjunction with fb:else.AttributesRequired Name Type Descriptionrequired uid intThe user ID to check.optional whatstring The privacy setting to check. (Default value is search). Other valid values are profile,friends, not_limited, online, statusupdates, wall, groups, courses, photosofme, notes,feed, contact, email, aim, cell, phone, mailbox, address, basic, education,professional, personal, seasonal.Examples Check out how cool is. Sorry, no dice.NotesAs of FBML v1.1 you can use this tag only on a canvas page.See AlsoYou can see a real world example of this tag in the Footprints demo application. Go to Demos for more detailsand to download and install the demo apps. www.yapish.com 16. facebook FBML Reference Guide Page 16 of 159Fb:if-can-see-photoDescriptionDisplays the enclosed content only if the logged in user can see the photo specified.You should use this tag[who says?] when specifying content that should only be shown when using fb:photo.You can use this tag in conjunction with fb:else.AttributesRequired Name Type Descriptionrequired pid int An API-supplied pid of the photo, or any pid found in the query string of a photo URL on Facebook.optional uid int If pid is not an API-supplied pid, this should be the id parameter in the query string used to find the pid.Examples Check out this cool photo! This one is cool too!NotesAs of FBML v1.1 you can use this tag only on a canvas page.www.yapish.com 17. facebook FBML Reference Guide Page 17 of 159Fb:if-is-app-userDescriptionDisplays the enclosed content only if the specified user has accepted the terms of service of the application. Use to determine whether the user has added the application to their account.AttributesRequiredNameTypeDescriptionoptionaluid int The user ID to check. (default value is loggedinuser)Examples Heres the users score: 55555! That user hasnt signed up for the app! Your score: 55555! You should sign up and play!NotesAs of FBML v1.1 you can use this tag only on a canvas page. www.yapish.com 18. facebook FBML Reference Guide Page 18 of 159Fb:if-is-friends-with-viewerDescriptionDisplays the enclosed content only if the specified user is friends with the logged in user.AttributesRequired NameType DescriptionoptionaluidintThe user ID to check. (default value is profile owner[verify])includeself boolReturn true if viewer and uid specified are the same. (default value is true)Examples Hey you guys are friends! Did you know that you have something in common?NotesAs of FBML v1.1 you can use this tag only on a canvas page. www.yapish.com 19. facebook FBML Reference GuidePage 19 of 159Fb:if-is-group-memberDescriptionDisplays the enclosed content only if the specified user is a member of the specified group.AttributesRequired Name Type Descriptionrequired gid intThe group ID.optional uid intThe user ID to check. (default value is loggedinuser) rolestring The role to check. (Default value is member). Other valid values are officer, admin.Examples Hey, youre an admin of that group! Sorry, admins only!NotesAs of FBML v1.1 you can use this tag only on a canvas page. www.yapish.com 20. facebook FBML Reference Guide Page 20 of 159Fb:if-is-userDescriptionOnly renders the content inside the tag if the viewer is one of the specified user(s).AttributesRequired Name Type Descriptionrequired uid intThe user ID of the user that is allowed to see the content. To match multiple users, passin a comma-delimited list of uids.ExamplesThis is secret 4 u 2!NotesAs of FBML v1.1 you can use this tag only on a canvas page.www.yapish.com 21. facebook FBML Reference Guide Page 21 of 159Fb:if-user-has-added-appDescriptionDisplays the enclosed content only if the specified user has added the application to their account.AttributesRequiredName TypeDescriptionoptionaluidint The user ID to check. (default value is loggedinuser)Examples This user has put this app into his account. That user hasnt put this app into his account. Hey, welcome! You must add this to your account to use itNotesAs of FBML v1.1 you can use this tag only on a canvas page.This tag seems to work inside on a profile page.www.yapish.com 22. facebook FBML Reference GuidePage 22 of 159Deprecated TagsFb:userlinkDescriptionPrints the specified users full name linked to their profile along with their network, optionally (as is normallydisplayed on the Wall, for example).This tag is deprecated. It is still useful in one context, however: using it in feed.publishActionOfUser (with theuser ID on whose behalf the action is being published) prevents the Mini-Feed from prepending the actorsname to your feed title.AttributesRequired Name Type Descriptionrequired uidintThe User ID for the user whose name and link you want to retrieve.optional shownetwork boolIndicates whether to display the network name. (default value is true) ifcantseestring The alternate text to display if the user cannot see the specified user ID.ExamplesSee AlsoYou can see a real world example of this tag in the Footprints and Restaurants demo applications. Go to Demosfor more details and to download and install the demo apps.fb:name www.yapish.com 23. facebook FBML Reference GuidePage 23 of 159Fb:if-is-own-profileDescriptionThis tag is deprecated, since if- tags are no longer allowed on profile pages.It was used to display content inside only if the viewer of the profile matches the profile owner.[verify]See also/instead fb:visible-to-userAttributesExamples Welcome back to your profile! This is not your profile.NotesAs of FBML v1.1 you can use this tag only on a canvas page.error=Not allowed in profile. How to replace this?See AlsoYou can see a real world example of this tag in the Whos Showing Up demo application. Go to Demos for moredetails and to download and install the demo apps.www.yapish.com 24. facebook FBML Reference Guide Page 24 of 159Profile-specificFb:wideDescriptionThe enclosed content appears only when profile box is in the wide column of the profile. See fb:narrow for theopposite.AttributesExamplesThis will only appear in the wide column.NotesIf no fb:narrow or fb:wide tag is specified, all content appears in either column.The wide profile box is 388 pixels wide, not including margins. The left margin is 8 pixels, but there is no rightmargin. For balanced margins, make your content 380 pixels wide.See AlsoYou can see a real world example of this tag in the Footprints demo application. Go to Demos for more detailsand to download and install the demo apps.www.yapish.com 25. facebook FBML Reference Guide Page 25 of 159Fb:narrowDescriptionRenders the content contained by the tag only if the profile box is in the narrow column of the profile.AttributesExamplesThis text appears only in the narrow column.NotesIf no fb:narrow or fb:wide tag is specified, all content is displayed in either column.The narrow profile box is 190 pixels wide, not including margins. The left margin is 10 pixels, but there is noright margin. For balanced margins, make your content 180 pixels wide.If you want your fb:narrow information to appear when installed, please remember to set the Default ProfileBox Column value to "Narrow" in Developer Application My Apps Applications Settings Installationsection. www.yapish.com 26. facebook FBML Reference GuidePage 26 of 159Fb:profile-actionDescriptionRenders a link on the users profile under their photo (such as "View More photos of..").AttributesRequired Name Type Descriptionrequired urlstring The URL to which the user is taken after clicking. Must be an absolute link.Examples Perform ActionNOTE: if-is-own-profile deprecated! See that function for detailsView Your StatusView this persons statusInvite this person to MyApplicationNOTE: example with fb:visible-to-user instead of the deprecated fb:if-is-own-profile View Your Application www.yapish.com 27. facebook FBML Reference GuidePage 27 of 159 Check Out ApplicationNotesUse profile.setFBML to add the button to a users profile.If you add this to the profile of a user who has not added your application, it will appear only to thoseusers who have added your application. By setting the default FBML (in Edit Settings, under MyApplications) to include an fb:profile-action, this action appears on every profile the user of yourapplication sees.There is a limit of about 30 characters in the action label. (Note: Leading and trailing white-space countsagainst this limit, so if your link is being elided, check for and remove any extra spaces between the tagsand the label text.)For users for whom you have not called profile.setFBML, the actions are read from the content in"Default FBML" section of your application settings. For the most part, this applies to any user who hasnot added your application.For users for whom you have called profile.setFBML, the actions are read from whatever content youset when you last called profile.setFBML for that user.Example: There are three friends -- Larry, Curly and Moe. Both Larry and Curly add your application.When Larry views Curlys profile, the profile actions that Larry sees on Curlys profile come from thecontent you posted to Curlys profile. When Larry views Moes profile, the profile actions Larry sees onMoes profile come from the default FBML content, because you havent called profile.setFBML onMoe, because you dont necessarily know he existsSee AlsoYou can see a real world example of this tag in the Footprints demo application. Go to Demos for moredetails and to download and install the demo apps.Application Visibility in ProfilesErrorsfb:profile-action: Required fbml_env var missing: "profile"- If you get this error, it means you tried to use the fb:visible-to-owner, fb:visible-to-app-users, and the otherfb:visible-to-*** elements on a Canvas page.fb:if-is-own-profile- Not allowed in profile. Use fb:visible-to-owner, fb:visible-to-app-users, and the other fb:visible-to-***elements instead.running example above through the [Facebook FBML validator] returns- RUNTIME ERROR: fb:if-is-own-profile: "ifs" are not allowed in flavor ProfileBoxFBMLFlavor--719255867 11:05, 19 November 2007 (PST)Most punctuation is stripped from the profiles box.Can someone write a working example that reproduces this behavior WITHOUT if-tags?www.yapish.com 28. facebook FBML Reference GuidePage 28 of 159Fb:user-tableDescriptionRenders a table, each cell of which contains a thumbnail and name for a particular user, similar to the MutualFriends table on profile pages. Inside this tag, use fb:user-item tags to specify the set of users. This tag onlyworks on profile pages. Applications cannot use this on their canvas pages.AttributesRequired Name Type Descriptionoptional colsintThe number of columns in the table. (default value is 6 for fb:wide, 3 for fb:narrow)Examples www.yapish.com 29. facebook FBML Reference GuidePage 29 of 159Fb:user-itemDescriptionRenders a single cell of a table, which contains a thumbnail and name for a particular user, similar to the MutualFriends table on profile pages. Must be used inside a fb:user-table tag. This tag only works on profile pages.Applications cannot use this on their canvas pages.AttributesRequiredNameTypeDescriptionrequireduid uid The ID of the user whose name and photo you want to show.Examples www.yapish.com 30. facebook FBML Reference Guide Page 30 of 159Fb:subtitleDescriptionDefines the subtitle for the profile box. The enclosed content is interpreted purely as plain text.This tag may contain fb:action, an optional tag that renders an action link on the right-hand side of the subtitle.AttributesRequiredNameType Descriptionoptionalseeallurl string The URL for a "See all" link. This URL must be a canvas page.ExamplesWall-to-wall Displaying 10 wall postsNotes This tag always renders the HTML title attribute with Learn More About This Application for seeallurl.[possible bug?] At present there doesnt seem to be any way to prevent this. This tag does not function within fb:visible-to- tags.[possible bug?]See Alsofb:title www.yapish.com 31. facebook FBML Reference GuidePage 31 of 159Fb:actionDescriptionRenders a link, usually for navigational purposes. Its appearance depends on its container.The tag must be a child of either fb:dashboard or fb:subtitle.AttributesRequired Name Type Descriptionrequired href string The URL for the link. The URL must be a canvas page. For example, href="http://apps.facebook.com//.php".optional titlestring Specifies the text to display as a tool tip for this link. (seems to do nothing at the moment) onclick string Call a FBJS functionExamplesfb:dashboard> Create a new photo albumCreate a new photo albumPhotos of YouThis article or section needs expansionNotesThe link appears in the top left of the fb:dashboard element and the top right of the fb:subtitle element.You cannot use FBJS onclick, since you cannot have the href attribute set to # or JavaScript:. You canuse the onclick attribute: use any absolute URL in the href and make sure onclick returns false to preventthe link from being followed. www.yapish.com 32. facebook FBML Reference GuidePage 32 of 159See AlsoYou can see a real world example of this tag in the Whos Showing Up demo application. Go to Demos for moredetails and to download and install the demo apps. www.yapish.com 33. facebook FBML Reference Guide Page 33 of 159Visibility on ProfileFb:visible-to-ownerDescriptionDisplays content inside only if the viewer of the profile matches the profile owner.This also works for Facebook Pages with the content only displayed to an admin of the Page.AttributesRequiredNameType Descriptionbgcolor colorThe color of the blank box shown to users who are not the owner.Examples Welcome back to your profile!NotesThis is new to FBML v1.1, make sure you wrap your code in and !.Do not use this tag to display private or sensitive information. Content inside this tag is rendered toall users browsers, including those who are not the profile owner. For those who are not the owner, thecontent is shown as white space on the page but it is still visible by viewing the page source.This tag cannot be used to for controlled display elements like fb:subtitlewww.yapish.com 34. facebook FBML Reference Guide Page 34 of 159Fb:visible-to-userDescriptionOnly displays the content inside the tag if the viewer is the specified user.[verify]This also works for Facebook Pages with the content only displayed to an admin of the Page and the viewer isnot on a Page profile.AttributesRequired Name Type Descriptionrequired uidintThe uid of the user that is allowed to see the content.[verify] bgcolor color The color of the blank box shown to users who are not the owner or the user specified.ExamplesThis is secret 4 u 2!NotesThis is new to FBML v1.1.This does not appear to accept a comma-delimited list of user ids like fb:if-is-user does. Request forsuch.Do not use this tag to display private or sensitive information. Content inside this tag is rendered toall users browsers, including those who are not one of the specified users. For those who are not one ofthose users, the content is shown as white space on the page but it is still visible by viewing the pagesource.Content in this tag is also visible to the owner. www.yapish.com 35. facebook FBML Reference GuidePage 35 of 159Fb:visible-to-friendsDescriptionUse this tag to display the content inside the tag on a users profile only if the viewer is a friend of that user.While this tag is still valid, you may find it more versatile to use fb:visible-to-connection, since it appliesequally to user profiles and Facebook Pages.AttributesRequired NameType Descriptionoptional bgcolor color The color of the blank box shown to viewers who are not friends of the user.ExamplesHello my friend!NotesThis is new to FBML v1.1.Do not use this tag to display private or sensitive information. Content inside this tag is rendered toall users browsers, including those who are not one of the specified users. For those who are not one ofthose users, the content is shown as white space on the page but it is still visible by viewing the pagesource.Content in this tag is also visible to the owner.www.yapish.com 36. facebook FBML Reference GuidePage 36 of 159Fb:visible-to-app-usersDescriptionDisplays the enclosed content only if the viewer has granted full permissions to the application.[verify]AttributesRequired Name Type Description bgcolorcolorThe color of the blank box shown to users who do not own the app.Examples Welcome users!NotesThis is new to FBML v1.1.Do not use this tag to display private or sensitive information. Content inside this tag is rendered toall users browsers, including those who have not granted full permissions to the application. For thosewho have not done so, the content is shown as white space on the page but it is still visible by viewingthe page source. www.yapish.com 37. facebook FBML Reference GuidePage 37 of 159Fb:visible-to-added-app-usersDescriptionDisplays the enclosed content only if the viewer has added the application to their account.[verify]AttributesRequired NameType Description bgcolor color The color of the blank box shown to users who are not the owner or have added the app.Examples Hey, welcome! Thanks for adding my app!NotesThis is new to FBML v1.1.Do not use this tag to display private or sensitive information. Content inside this tag is rendered toall users browsers, including those who have not added the app to their account. For those who have notadded the app, the content is shown as white space on the page but it is still visible by viewing the pagesource.www.yapish.com 38. facebook FBML Reference Guide Page 38 of 159Fb:visible-to-connectionDescriptionUse this tag to display the content inside the tag on a users or a Facebook Pages profile only if the viewer is afriend of that user or is a fan of that Facebook Page.AttributesRequired Name Type Descriptionoptional bgcolor color The color of the blank box shown to viewers who are not friends of the user or fans of the Page.ExamplesWelcome, fans!NotesThis is new to FBML v1.1.Do not use this tag to display private or sensitive information. Content inside this tag is rendered toall users browsers, including those who are not one of the specified users. For those who are not one ofthose users, the content is shown as white space on the page but it is still visible by viewing the pagesource.Content in this tag is also visible to the owner.www.yapish.com 39. facebook FBML Reference GuidePage 39 of 159Fb:18-plusDescriptionRestricts content to users who are age 18 or older.Examples