Prompt for extended permission in facebook app

Posted by mahmud ahsan on October 8, 2009 Facebook

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:

extended_permis

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: http://wiki.developers.facebook.com/index.php/Fb:prompt-permission

for fbjs reference visit: http://wiki.developers.facebook.com/index.php/Facebook.showPermissionDialog

Related Posts

Tags: , , ,

Comments (7)

 

  1. Arif says:

    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 ?

  2. mahmud ahsan says:

    @Arif, if user provide you the extended permission publish_stream, then you can easily publish something on user’s wall. Please check http://wiki.developers.facebook.com/index.php/Facebook.showPermissionDialog 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: http://wiki.developers.facebook.com/index.php/Stream.publish

  3. Arif says:

    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 :
    http://ourgroup.isgreat.org/fbTest/testConnect.html

    @Arif, if user provide you the extended permission publish_stream, then you can easily publish something on user’s wall. Please check http://wiki.developers.facebook.com/index.php/Facebook.showPermissionDialog 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: http://wiki.developers.facebook.com/index.php/Stream.publish

  4. Travis says:

    Hi Arif,

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

    Thanks,

    Travis.

  5. Arif says:

    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?
    Thanks,
    Travis.

  6. Travis says:

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

    Any other suggestions?

    Thanks

    Travis.

  7. a user says:

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

Leave a Reply