Get nested frames using Facebooker in iframe application

Has anyone encountered nested iframes in their Rails / Facebooker app? Basically, every time I click on an action or link, the entire facebook page reloads inside my existing iframe, causing two (or more each subsequent click) borders of facebook to appear.

I reviewed the instructions three times and changed all possible settings, but the application still opens on a new facebook page inside the iframe. Any ideas anybody?

itonly appears when i use

ensure_application_is_installed_by_facebook_user

but if the user has already installed the application and I use

ensure_authenticated_to_facebook

filter, it works great ... very weird (at least for me)

+1
source share
2 answers

Off: App__application_is_installed_by_facebook_user is deprecated due to a change to the Facebook API. I plan to update the Facebooker documentation soon.

+1
source

I experienced the same thing with nested iframes, so instead I used "sure_authenticated_to_facebook". The only problem was that after the user installed the application, he would redirect them to my domain, and not to the facebook iframe page. After some tweaking in facebooker, I decided to make hard code: canvas => "true" in this method, which is located in the line lib / facebooker / rails / controller.rb 189

def create_new_facebook_session_and_redirect!
      session[:facebook_session] = new_facebook_session
      next_url = after_facebook_login_url || default_after_facebook_login_url
      #top_redirect_to session[:facebook_session].login_url({:next => next_url, :canvas=>params[:fb_sig_in_canvas]}) unless @installation_required
      top_redirect_to session[:facebook_session].login_url({:next => next_url, :canvas=>"true"}) unless @installation_required
      false
end

- http://railsrant.com/2009/10/14/creating-a-facebook-iframe-app-using-ruby-on-rails-facebooker/

+1

Source: https://habr.com/ru/post/1731373/


All Articles