Kevin
Kevin

Reputation: 635

Facebook canvas app redirecting to Facebook logo

I am using OmniAuth gem to develop a Facebook canvas application and when I click log in, it just redirects me to a blank page that has the Facebook logo and then you have to click that again. Is there a way to make it so that it goes directly to the permission page?

Upvotes: 3

Views: 827

Answers (1)

julx
julx

Reputation: 9091

I think the problem you're experiencing is that when a redirect is performed using Javascript you actually redirect the iframe and not the whole web page. This causes a facebook page to be displayed inside an iframe, which gets detected and causes the logo + blank page to appear instead. What you want is to perform a redirect on the whole page. This can be achieved using:

window.top.location = somelocation;

Upvotes: 2

Related Questions