mkdynamic/omniauth-facebook — Issue #8: Facebook - If I use iframe=true, I get nil for env["omniauth.auth"]. :(
Author: phstc
Created: 2011-11-16 02:27:55+00:00
State: open

Hello

I would like to authorize and use my application only inside the Facebook. Is it possible?

I tried to use this configuration:

provider :facebook, app_id, app_secret, {:scope => "publish_stream, offline_access, email" , :iframe => true}
OmniAuth.config.full_host = "http://apps.facebook.com/yourapp/"

But it didn't work. :(

When I try to access the application inside Facebook (iframe) I get nil for env["omniauth.auth"].

If I comment the full_host

provider :facebook, app_id, app_secret, {:scope => "publish_stream, offline_access, email" , :iframe => true}
# OmniAuth.config.full_host = "http://apps.facebook.com/yourapp/"

It works very well, but just outside Facebook.

If I remove the iframe parameter

provider :facebook, app_id, app_secret, {:scope => "publish_stream, offline_access, email"}

I can use the application in both ways, inside and outside the Facebook. But... I can't authorize the application inside the Facebook, just outside. Inside (iframe) I receive the Facebook logo problem. Facebook shows me the logo instead of the auth permissions box.

- iframe = true
- authorization works inside and outside Facebook
- the application opens always outside the Facebook even if I try to access http://apps.facebook.com/yourapp/

- iframe = true (I want to use this one)
- OmniAuth.config.full_host = "http://apps.facebook.com/yourapp/"
- I get nil for env["omniauth.auth"]

- iframe = false
- authorization works ONLY outside Facebook. Inside I receive Facebook logo problem
- I can access the app inside and outside Facebook

My environment

* omniauth (1.0.0)
* omniauth-oauth2 (1.0.0)
* omniauth-facebook (1.0.0.rc1)

Cheers