Facebook App connection issue - facebook

I am trying to connect a facebook app but it is displaying error as "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."
the domain i am using is https://app.streamlivve.com
I tried all of solutions but nothing happen. here is my settings of FB app page
Can you please guide me to solve this error:

Facebook announced in Dec 2017 that in March 2018 they would change the settings for Oauth redirects:
https://developers.facebook.com/blog/post/2017/12/18/strict-uri-matching/
In a nutshell, you can only redirect to explicit, precise pre-determined URIs now. Which is annoying if (like me) you want to pass URI parameters back as well...

Make sure you're using Facebook SDK 5.6.2. There was an important fix.

Since this March (started running a couple of days ago), strict mode is now enabled by default. This means you now need to have the exact redirect URLs you're using marked as such in the app configuration.
You can see more here about what this entails and how to get on with the change.
Further, you need to update your dependency to version 5.6.2, as there's a bug in the previous version that wouldn't work with strict URI matching (yes, the one that is now enabled by default), so the login would break. You can see more about the fix in the pull request that fixed it. I can confirm that updating to 5.6.2 (PHP) fixed the issue.
To update your version in PHP, it depends on which expression you have in your composer.json, but if you have "facebook/graph-sdk": "^5.6", for example, a simple composer update will suffice.

Related

Facebook App - localhost & force https problem

Yet another Facebook app/API post I know, but please read carefully.
For better clarity, I'll add here that we're currently in 2021, March 29, their API has changed quite a lot over the last few months (and might change as well), therefore most answers on StackO aren't working anymore.
Furthermore, IMO their documentations aren't fully updated yet to the current version, and have things that doesn't exist anymore (like Dev/Live mode for ex).
After making sure that my app can work with my localhost by changing:
Settings -> Basic -> App Domains -> 'localhost'
Settings -> Basic -> Add platform -> Website -> 'http://localhost:8000/')
Add Product -> Facebook Login -> leave everything empty
Make sure to run my localhost with localhost and not 127.0.0.1.
It seems that the Facebook JavaScript SDK doesn't work from an http url.
As I'm working on localhost (so not in https) it is quite annoying. After checking the FB documentation and some tooltips in the Facebook login settings, it seems that localhost should work without https enabled. And if that wasn't enough: the Enforce HTTPS button is greyed-out and cannot be turned off anymore.
I also tried to put something in the Valid OAuth Redirect URIs, but the field/tooltip doesn't let you put http://localhost:8000/:
http://localhost redirects are automatically allowed while in development mode only and do not need to be added here.
As mentioned above, there is no such thing as development mode anymore, or at least no button or anything to change or even see the mode on their new interface.
Did anyone managed to make his localhost work with the JS SDK?
Ngrok and other answers are indeed appreciated, but I would like to know first if there is a "real" solution (on FB side) at this problem ("No there isn't yet" is an acceptable answer as it will probably save a lot of time for other people).
Thanks a lot!
Edit: The dev/live mode distinction still exists, but only for apps developed by individual developers. For business apps, they have been replaced with access levels. (see comment, #CBroe)
However, I tried without being in business, but it didn't work either.
It seems like there isn't any solution for my problem on Facebook side, the JavaScript error clearly says:
The Login Button plugin no longer work on http pages. Please update your site to use https for Facebook login.
As the link in the error goes to a blog post (not the documentation) and as I didn't find anything related to that problem in FB doc, well... can't use it in http pages.
Therefore for other people searching for a solution, I would recommend another StackO thread on how to turn your localhost django app to run in https (as I'm working with Django).
For those working with Google Chrome, following the above thread, you'll need to turn off Chrome error about your connection not being private, here is how:
open a new tab
paste : chrome://flags/#allow-insecure-localhost
enable the option 'Allow invalid certificates for resources loaded from localhost.'
Please, feel free to post another solution to my question if there is finally a way to make it work, or an update from FB side later on.

https is required for all redirect uris in login with facebook feature [duplicate]

I am using facebook SDK. I am getting the following error:
Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://
After studying I came to know that I have to set 'Enforce HTTPS' as NO under 'facebook login> Setting> '. But I can not set Enforce HTTPS as NO. Is this problem is from mine? OR I facebook restrict to use https instead of http?
enable Client OAuth Login and write "localhost:3000" in Valid OAuth Redirect URIs.
Save changes. it will automatically change to https://localhost:3000 , but it doesn't matter...
And set Status: In Development (THIS IS IMPORTANT!)
Then it will work in your http localhost.
But I can not set Enforce HTTPS as NO. Is this problem is from mine?
https://developers.facebook.com/docs/facebook-login/security:
Enforce HTTPS. This setting requires HTTPS for OAuth Redirects and pages getting access tokens with the JavaScript SDK. All new apps created as of March 2018 have this setting on by default and you should plan to migrate any existing apps to use only HTTPS URLs by March 2019.
Sounds to me, like they don’t want you to be able to even start without HTTPS, when you are creating a new app now.
Plus, Chrome has recently announced that they will mark all HTTP sites as insecure soon, from version 68 on, that will be released in July 2018. So you’re gonna have to go HTTPS rather sooner than later anyway.
The “big players” of the industry are currently pushing for this big time, whether we want it or not.
If you just enable Client OAuth Login and write just localhost:{port} to Valid OAuth Redirect URIs, it will work.
If you're developing locally with create-react-app, a quick solution is to add
HTTPS=true
to your .env file and just comment it out when you're not testing Facebook login.
It seems like Business apps do not have app modes and instead rely exclusively on access levels. Because of this, you can't set the app to the "Development mode".
All newly created apps start out in Development mode and you should avoid changing it until you have completed all development and testing.
https://developers.facebook.com/docs/development/build-and-test/
https://developers.facebook.com/docs/development/build-and-test/app-modes
However, if you wanna try out your app in a localhost, you need to create a test app, like you can check out in this thread:
How to fix 'Facebook has detected MyApp isn't using a secure connection to transfer information.' error in Laravel

Does Facebook SDK require HTTPS?

I am using facebook SDK. I am getting the following error:
Insecure Login Blocked: You can't get an access token or log in to this app from an insecure page. Try re-loading the page as https://
After studying I came to know that I have to set 'Enforce HTTPS' as NO under 'facebook login> Setting> '. But I can not set Enforce HTTPS as NO. Is this problem is from mine? OR I facebook restrict to use https instead of http?
enable Client OAuth Login and write "localhost:3000" in Valid OAuth Redirect URIs.
Save changes. it will automatically change to https://localhost:3000 , but it doesn't matter...
And set Status: In Development (THIS IS IMPORTANT!)
Then it will work in your http localhost.
But I can not set Enforce HTTPS as NO. Is this problem is from mine?
https://developers.facebook.com/docs/facebook-login/security:
Enforce HTTPS. This setting requires HTTPS for OAuth Redirects and pages getting access tokens with the JavaScript SDK. All new apps created as of March 2018 have this setting on by default and you should plan to migrate any existing apps to use only HTTPS URLs by March 2019.
Sounds to me, like they don’t want you to be able to even start without HTTPS, when you are creating a new app now.
Plus, Chrome has recently announced that they will mark all HTTP sites as insecure soon, from version 68 on, that will be released in July 2018. So you’re gonna have to go HTTPS rather sooner than later anyway.
The “big players” of the industry are currently pushing for this big time, whether we want it or not.
If you just enable Client OAuth Login and write just localhost:{port} to Valid OAuth Redirect URIs, it will work.
If you're developing locally with create-react-app, a quick solution is to add
HTTPS=true
to your .env file and just comment it out when you're not testing Facebook login.
It seems like Business apps do not have app modes and instead rely exclusively on access levels. Because of this, you can't set the app to the "Development mode".
All newly created apps start out in Development mode and you should avoid changing it until you have completed all development and testing.
https://developers.facebook.com/docs/development/build-and-test/
https://developers.facebook.com/docs/development/build-and-test/app-modes
However, if you wanna try out your app in a localhost, you need to create a test app, like you can check out in this thread:
How to fix 'Facebook has detected MyApp isn't using a secure connection to transfer information.' error in Laravel

Cant Use Facebook API on AppEngine

So, I have this grade project where I have to do a mashup and deploy it on AppEngine. So, everything is fine, and I even got it working some months ago, but when I deployed the project again after doing some changes and updating the facebook api, it no longer works.
Thing is, it does works on localhost. The error only occurs when deployed. It's only a normal publish post POST.
So, here's the error:
The URL was blocked: Redirection has failed because the URI is not incluided in the list of OAuth authorised of the application client. Check that the OAuth access of both client and web are active and add all the domains of your apps as OAuth redirection URI
This was translated from spanish so it might not be totally accurate.
So, it seems easy, but I don't really know if the proble is that I have to do something in the configuration of appengine control panel (most likely), in the configuration of the facebook api control panel or if it's something in the project code. I've checked everywhere and have the faint memory of solving this several months ago, but I can't anymore.
Thanks!
For Facebook login, you need to tell Facebook the URI of the page that the login will start from. If you change the URI, then the login process will break. You can set the URI from this page:
https://developers.facebook.com/apps/1234567890/fb-login/
Except that you need your app id in there instead of 1234567890. You can get there from here:
https://developers.facebook.com/apps

Have no idea why Facebook login doesn't work

Have no idea why Facebook login doesn't work. Tried all answers to similar questions.The weirdest thing is that there is another app with same settings which works just fine. Maybe there is some kind of update I don't know about.. App runs locally on http://127.0.0.1:8000
Added facebook login product and in value OAuth redirect URLS entered everything possible: localhost, http://127.0.0.1, http://127.0.0.1:8000
Made app public, tried also creating test app. In app domains it's localhost and in Site Urls I tried both localhost and localhost:8000
EDIT: FB init doesn't even work. So no response to debug or something
And anyways I get this error:
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.
Id and code is correct. The same works on different project(Checked id, all comas and etc). What else could be theoretically wrong? At least does the error mean what it says The domain of this URL isn't included in the app's domains. ?
Same problem here, Just started happening with no warning.
I was using .Net Identity 2.0 with Microsoft.Owin.Security.Facebook 3.0.1 however it seems Facebook may have deprecated support for this.
The only symptom I got when debugging is that the call to AuthenticationManager.GetExternalLoginInfoAsync() returns a null which is extremely not useful.
In the end I upgraded to the release candidate using the NuGet Package Manager Console command "Install-Package Microsoft.Owin.Security.Facebook -Pre"
If you're using .Net with this package then I recommend you test this solution in a staging environment first and see if it fixes the issues (and that it doesn't cause any new issues).
it's the FACEBOOK APP PLATFORM in settings
I had my disabled and kept getting error
I enabled the app platform and it works.
enter image description here