Prompt for extended permission in facebook app
Posted by mahmud ahsan on October 8, 2009
Facebook
If 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: 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
Comments (7)








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, 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
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
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.
Try the php Client instead. FBJS doesn’t work for it.
Unfortunately we’ve tried that too… we are using the PHP4 client.
Any other suggestions?
Thanks
Travis.
Think seriously about finding a better way to do this. poor implementation will annoy users and breaks facebook development rules.