Privacy is such an important concern on Facebook, and I want to make sure my application follows all of the rules and regulations so I respect my users and don’t get Terms of Service violations! How do I make sure I’m showing users only the Profile content from other users that they’re supposed to see?
tag gives you full control over whether to display one
user’s Profile content to another user. The simplest form is:
<fb:if-can-see uid="12345">You're allowed to see this</fb:if-can-see>
The simplest case is probably not all that useful to you, since
you’re probably more interested in a specific part of the Profile
rather than the whole thing. Add a
what parameter and include any one of the
<fb:if-can-see uid="12345" what="friends"> You're allowed to see <fb:name uid="12345" possessive="true" /> friends <fb:else> You're not allowed to see them. </fb:else> </fb:if-can-see>
Note that you can’t chain the
whats together, so you’ll have to nest
fb:if-can-see tags if you want to
check for more than one permission at a time:
<fb:if-can-see uid="12345" what="profile"> <fb:if-can-see uid="12345" what="friends"> You can see <fb:name uid="12345" possessive="true" /> profile and friends. </fb:if-can-see> </fb:if-can-see> ...