JavaScript authentication with c# sdk. What happens on server? - facebook

I have made a JS authentication on local server, and it also went fluently on server side. As I understood the sdk cached up with the JS auth and all went well. But When I have uploaded this on server, the IsAuthorized method returned false after the JS auth. Why could that happend? And how does the sdk handle the JS auth?

Check your website url in the facebook app configuration page. Maybe the domain is now different?

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

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.

Check if facebook oauth 2.0 october 1st migration is done

I'm using facebook connect on a website, it worked well with PHP SDK 3.0.1.
Now I've downloaded and started using PHP SDK v.3.1.1 and set Encrypted Access Token to enabled. It still works without problems. Is this enough for the migration? How can I check it? I don't use the js sdk.
According to the migration guide, it looks like you have done all the steps you need for Facebook on an external website by upgrading to 3.1.1 PHP SDK and set encrypted access token.
If you were hosting a fan page or app inside Facebook you would also need an SSL certificate. And there are several code changes required if you are using the javascript SDK which you say you aren't.

Facebook connect

I have an asp.net site and I use log in to facebook calling
http://www.facebook.com/login.php?api_key=API_KEY&connect_display=popup&v=1.0&next=http://localhost/site/login.aspx&cancel_url=http://www.facebook.com/connect/login_failure.html&fbconnect=true&return_session=true&skipcookie=true
Logs in very well, returns to my site, I see session parameter in url, but I can't catch any postback or something.
Could you help me, please?
Thank you
A couple of things to check:
Make sure that http://localhost/site (or whatever the url for the root of your app is) is set in your application's connect settings
If you're using the Visual Studio development studio development web server (Cassini), your app's url will include a port (for example, http://localhost:34256/site). This url (including the port) will need to be specified in your connect url in your application's settings on Facebook.