views:

1274

answers:

1

Hi, I'm making a flash game which will be up on facebook, I'm using python/django on the backend but to talk to fb. I use the facebook-flash-api. The problem is when I ask for extended permission from the user, using fbml. I get a link which I have to click and get the permission. How can I make sure a popup appears instead of the link. I'm using the following code.

permission

in the fbml it makes a link out of it, I wanted it to be a popup box instead of a simple link, how can I solve it?

+1  A: 

You should use the Facebook Javascript API. There is a function in it called FB.Connect.showPermissionDialog(perms) that does exactly what you're looking for.

http://developers.facebook.com/docs/?u=facebook.jslib.FB.Connect.showPermissionDialog

just_wes
I'm currently using python/django. How would I go about the java code embedding?
Fahim Akhter
For the record, it's not Java, it's javascript. And all you have to do is put the javascript in your output the way you would put html in your output. The browser is the thing that will interpret and execute the javascript, not the server.
just_wes
just_wes, thanks for the help got it working. Now the problem is the dialogue appears even after you have allowed it. Is there a method to check if the user has allowed it already?
Fahim Akhter
Don't you just love dealing with Facebook? For that problem, you can use the REST API to find out if certain permissions are set. Then you can add a condition to your code along the lines of "if !has_permission, showPermissionDialog." you can figure that part out. good luck with your project!
just_wes