facebook Error App Domain: [IP Address] is not a valid domain.?
Asked Answered
S

5

26

I give my production server IP address as App domain in facebook application but it's not saved. It returns error as App domain is not valid. So that I cannot use my facebook connect API.

Can we give IP address as App domain in FB application? If it's not, what is the other way to do?

Sartorial answered 17/2, 2012 at 15:13 Comment(4)
Are you sure the domain isn't marked as spammy in Facebook's systems? if it is you won't be able to share a link to that URL eitherChoplogic
yes...Its not marked spam by fb... I added server IP address as App domain but that returns error as invalid domain.can we add IP addreess as App Domain in Facebook Connect Application?Sartorial
I have the same problem. It seems that FB doesn't accept IP address as a domain name.Courageous
you should accept nitzan's answer as the correct one, @Rajapandian.Donkey
D
14

No, it looks like the app domain can only be a domain and not an ip address.

For example in the app settings page, near the App Domain hover the '?' and see:

Enable auth on domains and subdomain(s)

Also, I found this page: http://developers.facebook.com/docs/appproperties/ it refers to the REST api and so it's not that up to date, but it clearly states there that there are two different properties: base_domain(s) and ip_list.

I suggest that you try to put a normal domain and see what happens.

Derive answered 17/2, 2012 at 17:16 Comment(4)
@all thanks.. it wroks with domain name.Not working with the IP address.I think we cannot add IP address as domain..Sartorial
No you can't, you can only use domain names.Derive
Lame... Amazon payments requires me to use 127.0.0.1, but Facebook requires me to use localhost. So, no matter what, part of my dev environment will be broken.Deify
Well, you can use a trick: load the main page from the IP (like amazon requires) and have an iframe which loads the FB sdk from localhost. I'm not sure if you'll be able to communicate between window/frame (probably not), but you can use window.postMessage between them. Not an ideal solution but should work none the less.Derive
B
12

All Wrong answers. Here is the true

You must click (+ add platform)

then Select Platform choose app I select website the planet icon

Enter Site URL http://www.yoursitehere.com Mobile Site URL http://www.yoursitehere.com

go back and enter in App Domains: yoursitehere.com

now click save

go to Status and Review Do you want to make this app and all its live features available to the general public?

change or move to (YES)

Bejewel answered 30/1, 2014 at 2:36 Comment(1)
This is a generic answer for adding domains, which is not what the question is about. The OP is asking how to set this up to work with IP Addresses, not domains.Remember
H
8

This is what I found works.

  1. From the Facebook development page "Apps-YourAppName", click on Basic in the LEFT Nav.

  2. There are 3 sections on this page: Basic Info, Cloud Services, and "Select how your app integrates with Facebook"

  3. In the Select how your app integrates with Facebook section, select "Website"

  4. Enter your fully qualified domain name in the Site URL dialog box. Example: http://www.mydomain.com OR http://mydomain.com (my site does not include the www so I didn't add it).

  5. At the bottom of the page click the "Save Changes" button. You may receive a notice that it may take several minutes to blah blah blah....but you can continue with the next steps immediately.

  6. Now, in the Basic Information section at the top of this screen, you can now add your App Domain. This should be formatted as mydomain.com. Do not add "http://" and do not add "/" at the end of the domain name.

  7. NOTE: My site does not use the www, so I cannot confirm that it's required in Step #6. Try it both ways if you're unsure.

  8. At the bottom of the page click the "Save Changes" button. You may receive a notice that it may take several minutes to blah blah blah....but you can continue with the next steps immediately.

  9. At this point the error was NOT displayed as it was before.

Hope this helps!

Henrieta answered 18/2, 2012 at 14:2 Comment(1)
Regarding step 6.: Adding an IP address (versus domain name) still doesn't seem to work for me.Subastral
F
8

One solution to getting over the problem of using an IP address as a valid domain is to use: xip.io

xip.io is a magic domain name that provides wildcard DNS for any IP address

Simply add .xip.io after your url and use this as the domain name. Perfect for me as I do my development on a virtual machine!

Felicle answered 29/4, 2016 at 8:33 Comment(1)
Perfect solution! Thanks!Patchwork
U
4

If you don't have a domain (only the IP) just leave the "App Domains" field in blank. It works! =)

This, IMHO, is Facebook's fault as the error message is really confusing and makes you think only domains are allowed.

Hope it helps someone! =)

Unyoke answered 15/5, 2013 at 1:5 Comment(1)
This works, but I had to make sure to fill in the "Website with Facebook Login: Site URL" field with http[colon]//ip.add.re.ss to get it to work.Deify

© 2022 - 2024 — McMap. All rights reserved.