I've been trying to solve this out for about 4 hours (searching on google and stackoverflow and praying to the rain gods, nothing worked), so I really hope someone in here could help.
I'm developing an app where users can upload photos, vote them and comment them. Until now, it works OK in all browsers, except for internet explorer, where the app falls to an infinite loop, reloading the tab in the same 'step'.
I'm using the example code included in the SDK (latest sdk):
<fb:login-button scope="email,user_location"><img src="button image here">/fb:login-button>
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
appId: 'APP ID GOES HERE',
cookie: true,
xfbml: true,
oauth: true
});
FB.Event.subscribe('auth.login', function(response) {
window.location.reload();
});
};
(function() {
var e = document.createElement('script'); e.async = true;
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
document.getElementById('fb-root').appendChild(e);
}());
</script>
As in the example code included in the sdk, I use php to check if the user has already granted the app for permissions. The app file is called fotoapp.php and, if the user has granted permissions, is redirected to fotoapp.php?s=2 (s=1 is where I include the login button), if false, then is redirected to fotoapp.php?s=1. The 's' variable is only for file include purposes.
The only thing where I use fbjs is the event subscribe for the login reloading.
Does anyone have an idea to solve this?
Thank you very much!
I finally solved. Some time ago I had some problems with cookies in Internet Explorer, after looking for a solution, a came to a question in stackoverflow which solved my problems. I pasted the code "just in case" in my app... AND WORKED!! hahaha
The code to add is this: header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');
Here's the answer: PHP cookies problem, works in Firefox not in other browser
Thanks for reading :p