David MacIver RJ: DRMacIver CO: David R. MacIver Post Rating: 0 + / - Total Posts: 47 Karma: 56 Joined: Apr 5, 2012 |
Posted on Apr 21, 2012 It seems to redirect me off the page as soon as I start typing. From the index-login.php page it redirects to eos/fb. From the ratjoy front page it just redirects me to /.It seems to work ok in firefox, which is how I was able to log in to post this. |
Scott (Admin) RJ: Ratan Joyce CO: Ratan Joyce Post Rating: 0 + / - Total Posts: 1175 Karma: 5083 Joined: Jan 13, 2012 |
Posted on Apr 21, 2012 (Last edited on Apr 21, 2012) I just fixed the FB login button not working issue today, and this must be the side effect.Hopefully someone who used the FB API can help me on this one: Original code: FB.Event.subscribe('auth.login', function(response) { setTimeout('window.location = "http://www.ratjoy.com/eos/fb/"', 2000); }); Problem: When the button is clicked, console log shows user is already logged in and nothing happens. Current code FB.Event.subscribe('auth.statusChange' , function(response) { setTimeout('window.location = "http://www.ratjoy.com/eos/fb/"', 2000); }); Problem: Tries to redirect the user even when the user is logged into FB but not logged into the game? (not confirmed) EDIT: I may have solved it by doing this: FB.getLoginStatus(function(response) { if (response.status === 'connected') { setTimeout('window.location = "http://www.ratjoy.com/eos/fb/"', 2000); } }); FB.Event.subscribe('auth.login', function(response) { setTimeout('window.location = "http://www.ratjoy.com/eos/fb/"', 2000); }); |
James Grey RJ: Dairy Aire CO: Dairy Aire Post Rating: 0 + / - Total Posts: 26 Karma: 21 Joined: Apr 17, 2012 |
Posted on Apr 21, 2012 Have used FB API little but would this do the trick?FB.getLoginStatus(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; } else if (response.status === 'not_authorized') { // the user is logged in to Facebook, // but has not authenticated your app } else { // the user isn't logged in to Facebook. } }); |
James Grey RJ: Dairy Aire CO: Dairy Aire Post Rating: 0 + / - Total Posts: 26 Karma: 21 Joined: Apr 17, 2012 |
Posted on Apr 21, 2012 Also problem is confirmed, I do not get the problem when I log out of Facebook.
|
Scott (Admin) RJ: Ratan Joyce CO: Ratan Joyce Post Rating: 0 + / - Total Posts: 1175 Karma: 5083 Joined: Jan 13, 2012 |
Posted on Apr 21, 2012 Oh, you beat me to it! :-PThanks James, I think that did the trick. |
James Grey RJ: Dairy Aire CO: Dairy Aire Post Rating: 0 + / - Total Posts: 26 Karma: 21 Joined: Apr 17, 2012 |
Posted on Apr 21, 2012 All fixed :D
|