Name

<fb:if-can-see/>

Synopsis

<fb:if-can-see>...<fb:else>...</fb:else></fb:if-can-see>

Looks at a given user’s privacy settings and verifies, based on data provided to the what attribute, whether a user has permission to see the enclosed content. Use the <fb:else/> tag (described later in this chapter) to display content if a user does not have permission to display the enclosed content. <fb:if-can-see/> can be an excellent way to provide your own privacy controls on your application.

FBML-Specific Attributes

Required

uid=[int] default: none

The user ID to test privacy settings against.

Optional

what=[profile|friends|not_limited|online|statusupdates|wall|groups|courses|photosofme|notes|feed|contact|email|aim|cell|phone|mailbox|address|basic|education|professional|personal|seasonal] default: "search"

What to verify that the user can see, per their privacy settings.

Example FBML

Here is example FBML code for <fb:if-can-see/>:

<fb:if-can-see uid="0123456789" what="photosofme">
  <img src="http://fbmlessentials.staynalive.com/images/me.jpg"
  alt="external image of me" /> 
  <fb:else> Sorry - you can't see images of me! </fb:else> 
</fb:if-can-see>

Rendered HTML for Single Instance of Tag

This is the rendered HTML if user 0123456789 can see your photos (based on your privacy settings):

<img src="http://fbmlessentials.staynalive.com/images/me.jpg"
     alt="external image of me />

(Note that an image would be rendered in the browser.)

This is the rendered HTML if user 0123456789 cannot see your photos:

Sorry - you can't see images of me!

Additional Information

  • This tag supports <fb:else/>.

  • This tag may be used only on a user’s canvas page.

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

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