0

In facebook documentatin page login for canvas, they says:

Because your application is being loaded in an iframe, returning a 302 to redirect the user to the Login Dialog will be unsuccessful.

What is the reason for a 302 redirect not working inside an iframe? Does it mean that if I have any redirect in my app, should I do it via javascript, as they suggest or only this one?

Thanks in advance

duduklein
  • 10,014
  • 11
  • 44
  • 55

1 Answers1

1

Your app is in an iframe on the facebook website. So if they allowed that iframe to open another facebook page, it would look like a "facebook inside of facebook".

When a user loads your app in a canvas page, Facebook sends you a signed_request via POST to that page. You can read about how to handle that in the documentation.

Tommy Crush
  • 2,790
  • 1
  • 15
  • 18