Facebook authentication with pointer url

I have a domain name that points to my Amazon instance url. My app uses Meteor.loginWithFacebook() for authentication.

Unfortunately authentication through Facebook only works when a user goes directly to the url of the instance rather than the url that points to the instance. As far as I understand, my Facebook app settings are correct.

At the instance url, authentication is successful. At the pointer url however, the login with Facebook dialogue opens but is blank and doesn’t disappear.

How can I solve this issue?