What are App Domains in Facebook Apps? - facebook

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?

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

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.

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.

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).

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

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

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

Related

Automatic Login with facebook using a subdomain from My App

I know this is an old answer but I think the context is different for my use case.
I am trying to log in with Facebook and in the configuration of my application in Facebook I have my web application. For example the URL of the site I have is website.com. However, I am actually using subdomains, in this way, my application generates subdomains belonging to my clients. For example, the URL of my client in my application
to login is: subdomain1.website.com The error message I get from Facebook is:
JSSDK Unknown Host domain: The domain where you host the Facebook Javascript SDK is not in the list of host domains in your app's Javascript SDK. Specify your host domain in the app dashboard login settings.
How can I login with Facebook using a subdomain? Obviously, I don't want to add the sub-domains every time a new customer comes to my application.
Pd: I thought that with adding to Allowed Domains for the SDK for JavaScript *.website.com
but that doesn't work.
I hope your answers, thank you.

How to use facebook appid to work with multiple domains (not sub domains)

I have created an app on facebook and i am using that appid in my application to allow the users to login, like & share the content.
While creating the facebook app i have given a domain like "abc.com" in the "App Domains".
This is working fine when i access the page from "abc.com/mypage" but i want to do the same from "xyz.com/mypage", "xxx.com/mypage" etc....
The facebook login is working for only "abc.com" it is not working for otherdomains.
How can i make this work and i want the same behavior for multiple domains more than 2
Thanks,
You can only use one domain per "platform". Meaning, if you got 2 different Websites, you need to create 2 different Apps. But you can use the same App for a Website on one domain and a Page Tab or Canvas App on another domain (which is useful for testing on localhost, for example).
Solution is to have multiple applications.
Look closer at the Settings-Basic, you would find that the domain setting is at the top and is global. Try to add a second domain and you see this error message: "This must be derived from Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL".
And that's the solution: You can make your secure canvas url abc.com, mobile url xyz.com and siteUrl example.com.
I guess your abc.com is for "Website". So what you need to do is click "Add Platform - Facebook Canvas". And enter xyz.com/ as canvas url and example.com/ as mobile url. Then you can have three domain supporting signing in at the same time.
Facebook acknowledges that people have the need to use different domains for different purposes. But they decided to allow only one domain per purpose. The error message suggests that you may have up to five different url and hence five domains.

Domainname for Facebook login

For my website I want to add a facebook login. Now, when I want to create a new app on the Facebook Developers website they ask a domainname for my app. I don't have a domain. I'm still working on my site and I'm just working local on my localhost. What do I have to give in at that place? localhost, 127.0.0.1 and my IP Adress will not work.
http://d.pr/i/hUo9
I'm sorry but I think having a domain name is required, because they can't check your website when it's on a local machine.
If everyone would just use localhost/127.0.0.1 there is no way for them to check that you use their data for legitimate reasons.
Go through the Facebook app options and create a site on Heroku. It's free until your site is actually getting used (10,000+ db records and continuous traffic). You'll get a default domain name like "blissful-swan-3847.herokuapp.com", and you can edit the sub-domain to your liking or just paste the default into facebook. They even have a default facebook app ready to go in the language of your choice: Ruby-on-Rails, PHP, NodeJS, etc.

What is App Domain in Facebook Apps?

What is App Domain used for in Facebook Apps?
Somebody had asked the same in What are App Domains in Facebook Apps? but I didn't really get it.
What I am trying to do is "publish actions" from a mobile app. The object to be published must be stored in a separate web page. And the domain of the separate page is supposed to be included in app domains.
Is app domain applicable for Mobile apps as well?
Well AppDomain simply means where is located your application's server side files.
Your application only usable from that domain. Facebook needs data for cross domain and security issues.
Unless you're going to use FB auth for a website you don't need to fill App Domain input.
I encountered the same issue for my mobile app. To fix it, I set the App Domain to my domain. But that wasn't enough because I then got the error:
Error
You have specified an App Domains but have not specified a Site URL or a Mobile Web URL
puurbuy.com must be derived from your Site URL or your Mobile Web URL.
So I had to go one step further and enable "Website with Facebook Login" setting the URL to my homepage, even though I do not have a Facebook login on my website. A terrible work around in my opinion, but it worked.
Because not using Sandbox Mode:
1. Had to establish a category on appdetails page
2. Had to set Website with Facebook Login
3. Then able to set App Domain
Now the debug pulls in the correct information without error.
App domain is not something related to your app or web domain, this is basically a App Store address.
Simply write this line in App Domains.
apps.apple.com
this worked for me.

Given URL is not allowed by the Application configuration

I am trying to use the Facebook javascript sdk for my chrome extension. Since it is a chrome extension how do i integrate it with facebook? is it an app on facebook.com or a website?
Currently i have it as a website.
my site url on the settings is:
http://localhost/Users/home/Documents/facebook/
i have also enabled web sharing on my mac.
do i need to set the site domain as well? what am i doing wrong here?
Enter http://localhost/Users/home/Documents/facebook/ as your "Site Domain" on the developer app:
https://developers.facebook.com/apps/{api_key}/summary
Replace {api_key} with yours; or find a link at https://developers.facebook.com
Interestingly enough, Facebook lets you type anything into the domain so it can be an offline URL (such as localhost or a local port) and Facebook will redirect to it after authentication.
You can test Facebook applications locally if you add an entry to your hosts file which points to any subdomain of the root domain you gave Facebook. For example, if your domain is example.com, you can add entry to your hosts file pointing fbtest.example.com to localhost (127.0.0.1).
You can then test away locally without having to edit your Facebook app configuration (assuming your local server is set to serve the same content to all subdomains).
Alternatively, if it's important to have the exact domain, you can just add an entry for the root domain. It just means you won't be able to access the live site while testing.
In order to develop and publish a Facebook application, you must provide a web accessible URL that Facebook can query. If you have webspace you can upload to or make your IP available to the web for Facebook to call, it should solve your problems.
Facebook will allow you to put just about any valid url into the box, however when you go to use it for logins or general use, you will begin to notice errors, since Facebook's spider cannot fetch the url.
Check the 'Desktop Apps' section of https://developers.facebook.com/docs/authentication/
This explains how to do authentication where there's no server involved, it's aimed at desktop apps but a browser toolbar should work in a similar way