I have a website that uses the JavaScript JavaScript API for Facebook so that users can log in to the Ruby on Rails app via Facebook. When a user clicks to log in or log out, the Facebook code authenticates and then triggers an event and delivers a cookie with authentication parameters. Cookies are sent to my server and I use it for authentication. This has been working for a while.
// Connnect with Facebook. $('.fbLogout').click(function() { FB.logout(); }); $('.fbLogin').click(function () { FB.login(); }); FB.init({appId: '163691796982300', status: true, cookie: true, xfbml: true}); FB.Event.subscribe('auth.sessionChange', function() { location.reload(); });
I recently received a new computer, and my site does not work from this computer. The Facebook login interface seems to work, the auth.sessionChange event is auth.sessionChange , but it looks like a cookie is never delivered, so the page goes into an endless loop for receiving an authentication event, refreshing the page without cookie and repeating. The problem seems to be that this is the only computer that happens regardless of which browser I use and which OS I use.
It works on:
- Friendly PC using Internet Explorer
- Friendly PC using Firefox Friend PC
- PC friends using Firefox on Ubuntu 10.10 in VirtualBox
- Another computer on the same subnet as the new computer
- Booting a new computer from a 64-bit Ubuntu 10.10 CD
Does not work:
- New computer using Internet Explorer
- New computer with Chrome.
- New Computer Using Firefox
- New computer using Firefox in Ubuntu 10.10 in VirtualBox
Could this be caused by my network card or network configuration?
Update: It began to work as mysteriously as it failed.
javascript cookies facebook
Brian erickson
source share