124

I want to add the ability to 'login with Facebook' to my site. But I am confused when I register my site in Facebook Apps. What should I input into App Domains?

Lemmings19
  • 1,383
  • 3
  • 21
  • 34
Namal
  • 2,061
  • 3
  • 18
  • 26

8 Answers8

158

the app domain is your domain name.

Before you enter your domain, first click on Add Platform, select website, enter your site URL and mobile site url. Save the settings.

Thereafter, you can enter the domain name in the App domains field.

See more at my blog: http://www.ogbongeblog.com/2014/03/unable-to-add-app-domains-to-new.html

Andrew Barber
  • 39,603
  • 20
  • 94
  • 123
Jide
  • 1,742
  • 1
  • 11
  • 5
28

If you don't specify the platform for the app you won't able to add app domain correctly.

Here is an example -- validate that its a type a website platform. enter image description here

Gajen Sunthara
  • 4,470
  • 37
  • 23
25

To add to the answers above, the App Domain is required for security reasons. For example, your app has been sending the browser to "www.example.com/PAGE_NAME_HERE", but suddenly a third party application (or something else) sends the user to "www.supposedlymaliciouswebsite.com/PAGE_HERE", then a 191 error is thrown saying that this wasn't part of the app domains you listed in your Facebook application settings.

escape008
  • 267
  • 3
  • 5
  • @KyleGobel Well, in the title he ask what "app domain" is, right? – Alex Aug 22 '14 at 06:58
  • What if I create a virtual host on my local machine and then set it to the exact `www.example.com` host. Will Facebook block it? – David Mar 05 '16 at 20:40
9

In this example:

http://www.example.com:80/somepage?parameter1="hello"&parameter2="world"

the bold part is the Domainname. 80 is rarely included. I post it since many people may wonder if 3000 or some other port is part of the domain if their not staging their app for production yet. Normally you don't specify it since 80 is the default, but if you just want to specify localhost just do it without the port number, it works just as fine. The adress, though, should be http://localhost:3000 (if you have it on that port).

patriques
  • 5,057
  • 8
  • 38
  • 48
4

it stands for your website where your app is running on. like you have made an app www.xyz.pqr then you will type this www.xyz.pqr in App domain the site where your app is running on should be secure and valid

saurabh
  • 41
  • 2
1

It's simply the domain that your "facebook" application (wich means application visible on facebook but hosted on the website www.xyz.com) will be hosted. So you can put App Domain = www.xyz.com

Revious
  • 7,816
  • 31
  • 98
  • 147
0

In case you developing an iOS or Android app instead of a website, just remove value from app domains field.

Aleem
  • 549
  • 6
  • 13
0

I think it is the domain that you run your app.

For example, your canvas URL is facebook.yourdomain.com, you should give App domain as .yourdomain.com

hungneox
  • 9,333
  • 12
  • 49
  • 66
  • 3
    my url is http://ec2-46-51-248-9.ap-northeast-1.compute.amazonaws.com:9090/static/index.php...can you tell me what would i put in app domain – Invincible Apr 03 '12 at 11:43
  • 1
    You should put the whole thing but not the stuff after .com in the app domain: ec2-46-51-248-9.ap-northeast-1.compute.amazonaws.com – patriques Jan 15 '14 at 21:23