Facebook Login - How to configure the URL


#1

Hello!

Since I’ve launched my App to production I’m having problems with Facebook. I use accounts-facebook to let my users register using their facebook accounts. When running in localhost everything was working fine, I had everything configured like in this tutorial: http://bulenttastan.net/login-with-facebook-using-meteor-js/

The error I’m getting is the following:

Given URL is not allowed by the Application configuration: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

My app is running in www.myapp.com:5431, so I’ve configured facebook with this URL but it doesn’t work.

I think the absolute URL is well configured in the server. This is what I get using the absoluteUrl() in the client:

Meteor.absoluteUrl()
"http://www.myapp.com:5431/"

This is the configuration inside facebook:


SSL Broke Mobile Facebook Login
#2

I am also curious about this. I have the same problem. My app is deployed @ Digital Ocean.


#3

Have you guys also registered Android/iOS apps on Facebook?


#4

No one has deal with this? :S


#5

Sorry for insisting, but… Have you figured out how to make this work?


#6

We finally made this work. The problem was related with the port, the App was running under http://myapp.com:5431 and Fb was giving the errors above so we decided to migrate the app to a subdomain in the port 80 http://app.myapp.com

Hope this helps :slight_smile:


#7

Thanks for sharing @puliuk

So if it’s forced to work on port 80, how one can develop in a localhost:3000?


#8

Many thanks for sharing from me as well.
Had the same problem and couldn’t figure out how to get this to work. Thank you! :slight_smile:


#9

That I don’t understand… Because following this tutorial http://bulenttastan.net/login-with-facebook-using-meteor-js/ it worked perfectly in localhost:3000 but when using a different domain it looks like it is forcer to the port 80.

In any case I don’t think this is a Meteor issue but a Facebook one, but I can’t confirm this.


#10

If anyone else is still having this issue, I solved mine given a couple of circumstances - StackOverflow response here


#11

Thanks, ROOT_URL=https://localhost:3000 do the trick for me :slight_smile: