I have created an application using c# SDK.
The canvas page http://mywebsite/ is working fine and I made to accomplish what the client wants, but when i try to access the application via https://apps.facebook.com/ApplicationName which creates an iframe to http://mywebsite/, the login gets stuck.
This is what appears when I hit connect:

That is the permissions window, the permissions appear, I hit ok, and nothing happens.
Code:
<div id="fb-root"></div>
<script type="text/javascript">
window.fbAsyncInit = function () {
// alert("aqui estoy");
FB.init({
appId: '397613493644598', // App ID
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
FB.Event.subscribe('auth.authResponseChange', function (response) {
if (response.status === 'connected') {
// the user is logged in and has authenticated your
// app, and response.authResponse supplies
// the user's ID, a valid access token, a signed
// request, and the time the access token
// and signed request each expire
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
//alert("conectado");
// Do a post to the server to finish the logon
// This is a form post since we don't want to use AJAX
var form = document.createElement("form");
form.setAttribute("method", 'post');
form.setAttribute("action", '/Home/Login');
var field = document.createElement("input");
field.setAttribute("type", "hidden");
field.setAttribute("name", 'accessToken');
field.setAttribute("value", accessToken);
form.appendChild(field);
document.body.appendChild(form);
form.submit();
} else if (response.status === 'not_authorized') {
alert("Not Authorized");
// the user is logged in to Facebook,
// but has not authenticated your app
} else {
alert("Not logged In");
// the user isn't logged in to Facebook.
}
});
};
// Load the SDK Asynchronously
(function (d) {
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) { return; }
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
} (document));
</script>
<fb:login-button perms="user_birthday,email"> Connect</fb:login-button>
I may know what the problem is, but I need confirmation.
Does the problem is that facebook apps address is https and my app canva url is http?,
Found the answer, if you are testing stage, and this happens to you, you can do the following action.
Go to this link https://www.facebook.com/settings?tab=security
And disable secure browsing (this is just while you publish your app). Then your app should work fine.
Once you are ready to buy a certificate, and publish your application, Enable again this feature.
So the answer to my question:
Does the problem is that facebook apps address is https and my app canva url is http?,
is YES