Fb:if-is-friends-with-viewer

From Facebook Developer Wiki

Jump to: navigation, search

Contents

Description

Displays the enclosed content only if the specified user is friends with the logged in user.

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.

Attributes

RequiredNameTypeDescription
optional uid int The user ID to check. (Default value is profile owner[verify].)
includeself bool Return true if viewer and uid specified are the same. (Default value is true.)

Examples

<fb:if-is-friends-with-viewer uid="12345"> Hey you guys are friends! <fb:else>Did you know that you have something in common?</fb:else> </fb:if-is-friends-with-viewer>

Notes

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

reference