I have a Facebook application which basically shows the website inside a Facebook application window.
On Firefox, when I try to use my Facebook application, it says that the script at “https://connect.facebook.net/en_US/sdk.js" cannot be loaded. Therefore I can't use the application since I need to use the Facebook SDK in order to be able to login. However, when I use the app on a Firefox private tab, there is no problem with logging in. Everything works fine.
On Chrome, I can see my application but logging in does not happen automatically (which is not expected behavior, logging in usually happens automatically). The application does not respond at all.
We didn't have these issues until recently. The code of the application has not changed so I am suspecting the problems are related to the SDK.
I also noticed that this doesn't happen to every user. Only some of them are affected.
(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) { return; }
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
This is where I get the "couldn't load the script" error. Do you have any ideas as to why I could be experiencing this?
EDIT: Disabling Facebook Container on Firefox worked. But I still can't login to my application on Chrome - I don't get any prompt or response from the server.
On Chrome's developer console, I receive this error: A cookie associated with a cross-site resource at was set without the SameSite
attribute. It has been blocked, as Chrome now only delivers cookies with cross-site requests if they are set with SameSite=None
and Secure
.
I tried some of the solutions at how SameSite attribute added to my Asp.net_SessionID cookie automatically? , however none of them seemed to work. I had to manually disable SameSite by default cookies.
Do you have any other suggestions to overcome this SameSite cookie problem? I'm using .NET version 5.2.7.