16 Dec 2009, 04:00
Photo_1_pragsmall

Victor (18 posts)

Hi,

I would like to include the promptpermission attribute in a ajax form. The desired result if that when the user enters the information in the form Facebook will check to see if the specified permission is granted. I have tried including it as an html option, but without success. Here is what I’m trying:


<% form_remote_tag(:url => test_url(:canvas=>false),:update => "area", :html => 'promptpermission="create_event"') do %>
Test:    <%= text_field 'test', 'test'    %><br/> 
<%= submit_tag 'Create Event' %>
<% end %>

This generates an error:


ActionView::TemplateError (index 78609 out of string)

I would like to thank in advance any contributors that address this question, thank you very much!

~Victor

16 Dec 2009, 13:54
Head_pragsmall

Mike Mangino (543 posts)

The :html argument takes a hash. That should be :html=>{:promptpermission=>"create_event"}

Mike

17 Dec 2009, 02:37
Photo_1_pragsmall

Victor (18 posts)

It worked! Thank you!

~Victor

19 Jan 2010, 00:15
Photo_1_pragsmall

Victor (18 posts)

Hi,

I am still having some trouble with this, although I can successfully a request permission after it has been granted the user is redirected to:

http://web1.tunnlr.com:XXX/grant_permissions?_f…

I’m trying to update an area, the text/partial I would like the JS request to render in the area is rendered, but the user has left the canvas page (the text is on an otherwise blank page).

Is there a work around for this? In the documentation for prompting for permission at http://wiki.developers.facebook.com/index.php/F… it indicates there is an option (next_fbjs) to execute JS after the request has been granted. Is there a way for me to use that to send the user back to the canvas?

Please let me know if I can provide any additional information.

Once again, thank you for your help!

~Victor

19 Jan 2010, 13:36
Head_pragsmall

Mike Mangino (543 posts)

Have you tried sending a next_fbjs parameter? Maybe that will be executed. I’ve never tried this so I can’t really help.

Mike

  You must be logged in to comment