Prompt for extended permission in facebook app

fb_logoIf you are working in facebook application, you may need to ask your user for extended permission. If you want to know more about extended permission please visit here and learn about extended permission.

In short, if your application want to access some special info of user or want to do some special tasks then it need the permission of the user. Now I’m describing how will you prompt for extended permission.

There is an FBML tag for this purpose

<fb:prompt-permission perms="read_stream,publish_stream">Would you like our application to read from and post to your News Feed?</fb:prompt-permission>

This code will render a link, when user will click that link, a permission box will open and ask user to give extended permission. But if that user already given that permission, then the box will open and close.

The special permission box looks like this:


Now If you want, the extended permission box should open after a javascript event occurs then what will you do?

The answer is its also possible as facebook provided a function for it.

Facebook.showPermissionDialog('publish_stream, read_stream', ondone, showProfileSelector, '');

So for fbml reference visit:

for fbjs reference visit:

mahmud ahsan

Computer programmer and hobbyist photographer from Bangladesh, lives in Malaysia. My [Github | Business | Twitter | Linkedin | Youtube | Instagram | 500px]

You may also like


  • Arif
    November 2, 2009 at 2:54 pm

    Hi There,
    Can you give any idea how I can publish feed from external website ? I can publish but I want to put it on schedule.
    What would be best possibly way to do this ?
    How can I publish without prompting the user for permission ?

  • Arif
    November 9, 2009 at 12:55 pm

    Thanks for your reply,Mahmud.
    Well, the exact situation is I wanna post to my Page’s [as the Page itself] feed periodically from my website.
    I can post to my Page[as page itself].But I get the Prompt dialog all the time even though I have granted the stream_publish and set the auto publish to true.
    Can you please put me in light providing some code examples ?
    However,You can check the code I am working on at :

    @Arif, if user provide you the extended permission publish_stream, then you can easily publish something on user’s wall. Please check for how to prompt user for extended permission. When you’ll get extended permission, then using cron and api you can publish scheduled message on users profile. check this link also:

  • Travis
    November 20, 2009 at 4:48 pm

    Hi Arif,

    I am trying to do the same as you are with the Fan Page… did you find a solution for this?



  • Arif
    November 20, 2009 at 7:14 pm

    Try the php Client instead. FBJS doesn’t work for it.

    Hi Arif,
    I am trying to do the same as you are with the Fan Page… did you find a solution for this?

  • Travis
    November 20, 2009 at 8:18 pm

    Unfortunately we’ve tried that too… we are using the PHP4 client.

    Any other suggestions?



  • a user
    January 9, 2010 at 5:43 pm

    Think seriously about finding a better way to do this. poor implementation will annoy users and breaks facebook development rules.

  • senkal
    April 21, 2010 at 7:15 am

    Thanks, simple solution is the best solution 😀

  • Noirita
    May 21, 2010 at 3:16 pm

    I have created one Facebook application and its running perfectly. After enabling New Data Permissions for my app, when i add my app , it asks me to Accept or Reject. When I reject it I get Error 100. Can you help me out

    • mahmud ahsan
      mahmud ahsan
      May 21, 2010 at 6:09 pm

      But this is not happening for my application. So its tough to guess the reason.

  • Patricio
    June 7, 2010 at 8:04 pm

    thank s again!!!

  • tomas
    August 19, 2010 at 12:00 am

    Hi, im using your facebook photo-gallery app. I want to get different extended permisions when you first open the app.

    Im trying with this: $user_id = $facebook->require_login($required_permissions = ’email, publish_stream, status_update, user_birthday, user_location, user_work_history, user_photos, user_photo_video_tags’);

    It works, but it only ask permission for “accesing to my basic info”, do you know why it ain’t asking for the other permissions?

    • mahmud ahsan
      mahmud ahsan
      August 19, 2010 at 3:33 am

      My app is developed base on old facebook library. Update new facebook php library and place all the permissions name in the authentication place, then you’ll see all the permissions at one place. Checkout facebook’s latest library and their usage.

    September 1, 2010 at 4:59 pm

    can anyone tell me how to get extended permission with require_login($required_permissions = ‘publish_stream’);
    coz it only asks for basic info and not asks for extended permissions so what modifications i hav to made to get this code work.

  • chat de amigos
    September 27, 2010 at 7:30 am

    thanks !! but dont works 8 (

  • Suryakant Kale
    October 20, 2010 at 2:27 pm

    How to subscribe application using FBML+PHP?

  • Mizo
    November 1, 2010 at 3:08 pm

    Hi Mr Mahmod
    i tried ur code and it didnt work

    it renders no button , renders only the message :
    ” Would you like our application to read from and post to your News Feed? ”

    whats wrong ?! , waiting ur reply .

    • mahmud ahsan
      mahmud ahsan
      November 1, 2010 at 11:59 pm

      Facebook changes there way. Now you have to provide extended permission list at the time of authentication.

      • Mizo
        November 2, 2010 at 2:24 am

        Can You Give Me Example (code) please .
        im sorry for annoying
        but i really need it

        thank you so much .

  • Jangla
    November 1, 2010 at 6:00 pm

    I can’t get fb:prompt-permission to work in a tab application 🙁

  • Rolex Cellini
    January 3, 2011 at 12:11 pm

    Wowo !!!
    that great post
    Excellent website.This is very informative..

  • Talk Binary
    January 6, 2011 at 4:28 am

    Can you provide an example on doing this with php? Thanks!

    • mahmud ahsan
      mahmud ahsan
      January 6, 2011 at 9:03 pm

      This is old post for old facebook system. Skip it please.

  • ash
    March 17, 2011 at 3:38 pm

    hello mahmud!
    Can you please guide me on how I can prompt user for extended permissions in the development of an graph api and iframe application.
    I can do so at the start of the application only

    • Auz
      January 11, 2012 at 8:51 am

      @ash –

      Grant Permissions to create events

    • Auz
      January 11, 2012 at 8:53 am
      <fb:login-button scope="create_event">
          Grant Permissions to create events
  • samr
    September 1, 2012 at 5:42 pm

    what permissions i need for my app in order to be able to do likes in my users behalf ?
    samir taha

  • Sadie
    June 14, 2013 at 2:07 pm

    Asking questions are in fact good thing if you are not understanding anything fully, except this article offers good understanding even.

    June 23, 2013 at 10:26 am

    Hello, I do think your website could possibly be having internet browser
    compatibility issues. When I take a look at
    your website in Safari, it looks fine however, when opening in Internet Explorer,
    it’s got some overlapping issues. I merely wanted to provide you with a quick heads up! Besides that, fantastic blog!

Comments are closed here.