Facebook development on localhost with MVC - facebook

I have an MVC facebook app I'm writing but when I run it, I keep getting, "Can't Load URL: The domain of this URL isn't included in the app's domains. To be able to load this URL, add all domains and subdomains of your app to the App Domains field in your app settings.". I have googled this to death and still can't get it working. I have set up a test application in facebook and I have updated all the app IDs, etc in my web.config. I added 'localhost' as a domain and https://localhost:port as the URL. I have yet to get it loaded without this error. Any help would be very much appreciated.

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.

Can't load the URL: The domain of this URL isn't included in the apps domains - add all subdomains and domains

I'm trying to get a Facebook app to work, and I am including my domains and my subdomains in my app domains.
I have:
v2.name.com
id.v2.name.com
name.com
the call is going to id.v2.name.com, but for some reason it just isn't working.
What setting do I need to put for the Facebook app to make this work?
This was related to not having a valid redirect URI for my application.
Personally I feel the error message should be clearer for this problem, as it indicates the problem is with the App Domains, when it is not

How to do local development with Facebook app?

There are many similar questions on SO but Facebook constantly changes settings and protocols, so answers provided several years ago no longer work or can't be applied.
I attempt to add Facebook Login to my app using JS SDK. When I try it from http://127.0.0.1:8000/, popup tells me that I must add this address domain to "Application domains" in app settings. However, this can't be done for localhost. Here's what I tried so far:
Adding 127.0.0.1 or localhost to app domains, which gives an error message: "App domains must match the domain of the Secure Canvas URL, Mobile Site URL, Unity Binary URL, Site URL or Secure Page Tab URL. Please correct these domains: localhost".
Creating test app and changing Site URL to http://127.0.0.1:8000/, then adding 127.0.0.1 to app domains. This seemingly works, but after accessing settings page again settings remain unchanged and login doesn't work either.
What does seem to work is setting Site URL on main app, but this is undesirable - I want it to work with my production site URL and test apps are supposed to be used for development.

Windows Phone 8 C# facebook app registration

Hi I've created an app for Windows Phone 8 using the ContosoSocial Facebook login interface.
It uses the following call to do this:
FacebookSessionClient fb = new FacebookSessionClient(AppId);
fb.LoginWithApp("basic_info,publish_actions,read_stream", "custom_state_string");
This works fine when I use the default AppId but when I change it to the one given by Facebook following app registeration I get the following error:
Given URL is not premitted by the application cofiguration.: One or more of the given URL's is not allowed by the App's settings. It must match the website URL or Canvas URL, or the app domain must be a subdomain of one of the Apps domains..?
I've searched and this problem has come up on several occations and as far as I can work out it's to do with my app settings on Facebook.? Facebook asks for an App Domain which I've left blank as I'm not sure what this is or used for..? Do I need one..?
I've followed several tutorials Scrumptious but then all show a different app registration process on the screens than I'm faced with. A little research revealed that Facebook has recently changed the process which is making it even more confusing for me. I would appreciate some help here.
I want to create an app which will pull in a news feed direct into a panoramic item on the app's main screen.
Many thanks
EDIT: I've tried adding my web site URL to the app domain by I get the following error: This must be derived from Canvas URL, Secure Canvas URL, Unity Binary URL, Site URL, Mobile Site URL, Page Tab URL or Secure Page Tab URL. Check and correct the following domains: ***************
Below is the screen shot for configuring app:
Store ID, Application Name & Windows Store Beta ID removed, I'm now getting the following error:
App Not Setup: The developers of this app have not setup the app properly for Facebook Login. ?
Go to Advanced Settings in your developers.facebook.com/apps/ of your app and check that "Embedded browser OAuth Login" is enabled and set to Yes.

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.