Fb:if-can-see

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Displays 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 your own privacy using Facebook's current controls.

Important: You should use this tag to gate elements in your application that already are privacy-controlled. Do not use this tag to gate content like rendered user data, as a savvy user can view the source and see what's hidden.

You can use this tag in conjunction with fb:else.

Attributes

RequiredNameTypeDescription
required uid int The user ID to check.
optional what string The privacy setting to check. (Default value is search.). Other valid values are profile, friends, not_limited, online, statusupdates, wall, groups, photosofme, notes, feed, contact, email, aim, cell, phone, mailbox, address, basic, education, professional, personal, seasonal.

Examples

<fb:if-can-see uid="12345" what="profile"> Check out how cool <fb:name uid="12345" /> is. <fb:else>Sorry, no dice.</fb:else> </fb:if-can-see>

Notes

As of FBML v1.1 you can use this tag only on a canvas page.

See Also

You can see a real world example of this tag in the Footprints demo application. Go to Demos for more details and to download and install the demo apps.

reference