How to request permission in facebook application?

I am developing a facebook application (FBML) and I want to ask for certain advanced permissions the first time a user comes into the application. How to do it?

Please note that I am not using the new graphics API for this application.

+4
source share
1 answer

I can think of two ways:

  • You use the fb: prompt-permission tag to display a link that, when clicked, opens the advanced permissions dialog.

  • You redirect unauthorized users to the application login page, requesting the appropriate permissions:

<fb:if-is-app-user>
<!-- your normal code -->
<fb:else>
  <fb:redirect url="http://www.facebook.com/login.php?v=1.0&api_key=[your_app_key]&next=[your_canvas_page_URL]&canvas=&req_perms=[comma-delimited list of permissions]"/>
</fb:else>
</fb:if-is-app-user>

URL- : http://www.facebook.com/login.php?v=1.0&api_key=147433427237&next=http%3A%2F%2Fapps.facebook.com%2Fkickabout%2F&canvas=&req_perms=publish_stream

: https://developers.facebook.com/docs/authentication/

+5

All Articles