Prompting for Extended Permissions
Problem
I need to get permission from users to send them email, get an infinite session, update their status, upload and tag photos, and create or modify Marketplace listings. Is there an easy way to do that?
Solution
Sure is! Use the fb:prompt-permission button, which was added in the mid-2008 Profile
redesign:
<fb:prompt-permission perms="set_status">Can we set your status? </fb:prompt-permission>
The tag will display the text (or any other FBML) you put into it as a link that opens a confirmation dialog like the one shown in Figure 6-44.

Figure 6-44. Prompt permissions confirmation dialog
Discussion
The following extended permission strings are available:
emailoffline_accessstatus_updatephoto_uploadcreate_listing
Facebook will show links (or other FBML) only for permissions
the user hasn’t already granted you. You can optionally pass a
next_fbjs parameter into the fb:prompt-permission tag to specify
an FBJS function that you’d like called after permission has been
granted, which gives you the option of hiding the link.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access