I have an application which integrates with facebook via oauth2 devise/warden/omniauth. Everything works find and I am happy with it.
Now I'm trying to integrate the app with the new facebook appcenter, which basically seems to resolve into getting the user pre authenticated before he gest to my site.
Basically, the user ends on a url like
/?fb_appcenter=1&code=xxxxxx
but devise' omniauthcontroller is waiting on a different url, namely
/users/auth/facebook/callback
I tried to perform a simple redirect carrying over the code query parameter to the callback url, but I get an "invalid credentials" error.
I believe the issue may be that the redirect_uri used in the call to get an access_token within the oauth2 facebook strategy does not correspond to the one used by facebook itself to generate the initial code, but I have no idea on how I am supposed to change that.
Anyone has suggestions or has solved this in the past?
For what is worth, I'm using an old version of devise (1.4) and omniauth (0.3) but a hint of what the general direction should be, even if with newer versions, would be good enough.