I’m developing a simple Facebook app that will live in a Page’s tab. I’m trying to figure out what the best method is for authenticating users. It seems that normal page redirection isn’t right, which is how OmniAuth + Devise do it out of the box. How can I make this work with the JavaScript SDK’s auth dialog?
Share
As DMCS said,
FB.getLoginStatusandFB.loginwill do it on the JS side of things. As for hooking it up with devise/omniauth, assuming you’re using the latest omniauth where provider-specific logic has been split out into their own gems, the facebook-omniauth Github page explains it as so:Now thats nice and easy. After the FB.login, a simple window.location.href = ‘/auth/facebook/callback’ will do the trick!