Facebook redirect

From google:

For security, the redirect_uri must have the same base domain as that specified in the App Domain property of your app’s settings, or be a URL of the form https://apps.facebook.com/YOUR_APP_NAMESPACE.

Also maybe localhost in redirect_uri is denied.

Why you don’t use Oauth2 gem?