https problem while implementing Facebook login on local host in development mode - facebook

I am developing a web-app which will manage user page posts etc,
My app in Facebook developer console is in development mode, but when i try to login in http://localhost then it gives error that facebook login does not allow http but i have to use https protocol.
Any solution to test facebook login in localhost with http ? or
Any idea to convert http to https in localhost?
I tried ngrok that converted http to https but facebook developer console said it is suspicious kinda link and refused to accept;
I am using a npm pakage react-facebook-login,
I will shift to pure code of facebook sdk if that will solve problem.

This is a solution I found for create-react-app. https://create-react-app.dev/docs/using-https-in-development/
Make sure you use the right terminal and it works. For instance, I started dev in the cmd line (set HTTPS=true&&npm start).
The downside is you still will get not secure warnings in the browser but the errors with the FB.login or similar from Facebook login packages went away. Hope it helps.

Related

Cant test FB SDK login locally even though I have set my domain and site URL (app is test mode)

I am developing a web app with Facebook integration and I can't figure out why I can't test the login function locally. I have looked through the answers here (How to Test Facebook Connect Locally) and have tried to follow the steps of having the app in test mode, setting the site URL and the domain.
Based on FBs documentation here: https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/
I should be able to use http for localhost development, but I get the error
The method FB.api can no longer be called from http pages. https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/
and can't log in. Below are pictures of my app settings (including an indication it is an app in 'test mode').
So this is really only a half answer, but it seemed easier for me to just force https for my local development using mkcert (https://github.com/FiloSottile/mkcert). After creating local certs I updated my site URL to say https://localhost:8080 and I am able to log in without issue.

Azure facebook login on localhost

For my cordova application i am running a Azure .net backend.
To access it from the client i use the mobile service client plugin for cordova.
Now to my problem:
I want to allow a facebook login which is already supported by the mobile service client. Therefore i registered a FB-application as described in the azure tutorial
Everything works well when i access the published backend. However if i am running it locally, the facebook login fails without any helpful error message.
It must be a problem with the facebook app settings.
For the case where i am running on localhost, i created a second testapplication with the following settings:
For the valid oAuth redirect URIs i have tried different things.
Does anyone have an idea how i could solve this?fa

http status 302 error in tomcat eclipse

I am developing a Telco application (Dyanamic Web application project to send and receive sms) using Eclipse & tomcate version 7
When I try to run it on
http://localhost:8080/SMS1
It gives an error message HTTP-ERROR-CODE:302
What should I do to resolve this error
This is the link to Application and video tutorial what I am following
https://drive.google.com/file/d/0B3VmCeqDC7SDcFZaWVZhRUNmaTQ/edit?usp=sharing
HTTP code 302 is a standard "redirect" message--that is, it tells your web browser that the page was moved and where the new page can be found. I'm guessing whatever you're using as a web browser (Eclipse?) just doesn't handle that type of redirect. Try using a standard web browser like Chrome or Mozilla to see if that helps...
Also a guess, but the redirect may be trying to move you to HTTPS instead of HTTP, and your certificates may not be set up properly, or the port isn't enabled, or there may be some other problem with your HTTPS configuration. If the app is supposed to work over HTTPS, try going directly to the HTTPS version of the link to see if that's the real issue.
A third guess is the app may be trying to redirect you to a login page if you're not logged in, and maybe it can't find it. I'd need to know a lot more about the built product and I really don't want to mess with some guy's shared Eclipse project. Tell them to use a build tool!

Troubleshooting IE 9 SSL certificate error

I have a Facebook canvas app that calls various external files over https. When loading FB over http and then navigating to the app, I get the message "Internet Explorer blocked this website from displaying content with security certificate errors."
I realize there could be any number of culprits in a mixed environment, but how to best troubleshoot the specific request(s) that trigger the error? The IE dev tools don't provide a clue, as the error is not reported in the network or console tab. When I view the same page in Chrome, I get no SSL error, so I can't find a clue there.
Essentially what I've done so far is to proceed by clicking "show content", logging all the https requests in Charles, then trying them all individually in IE to see if any trigger the error out of context.
thanks
The F12 Tools Console typically will show the exact source of a HTTPS error, as will the Fiddler Web Debugger. Is there a repro URL we could look at?
Do you have fiddler or httpwatch to figure out whether the request is being forwarded to another secured (https) URL?

Facebook connect 403 Access Denied

I am using the Facebook JavaScript SDK for a project I'm currently working on. It's been working fine before, but when I opened it today, the URL http://connect.facebook.net/en_US/all.js is not accessible. When I inspected the network using Firebug, I noticed that the server was returning 403 Access Denied.
Is there something I am getting wrong or is it Facebook server problem?
Finally figured out that Facebook's new HTTPS feature is interfering. Using https://connect.facebook.net/en_US/all.js solves the problem. Seems someone misconfigured their servers.