I have a strange problem. I’ve downloaded the latest php sdk. In there are 2 examples: one with php (example.php) and one with php + javascript (example2.php). I have put both on the server, filled in the app id etc etc and all works fine (both use same app id etc).
I primarily use the js sdk to let people login, this works great, but I also wanted to let them log out. The js sdk doesn’t have a logout button???, so I thought: lets use the php logout link. This is where the trouble starts. When I login with the js sdk, I am logged in and al works fine. But when I logout using the php logout link, I do get logged out, but then the page keeps refreshing. Strange huh? I have reproduced it using the example files stated above:
- Step 1: open example2.php and login (you wil login using the js sdk)
- Step 2: open example.php (you are still logged in) and click the
logout link (you will get logged out now) - Step3: open example2.php
again, notice the page refreshes (I think to check you login status)
but it keeps refreshing over and over again
Has anybody else the same results? And how to work around this?
Okay, I seem to fixed the issue.
In the js sdk part comment out the following:
Now I can just logout, page gets refreshed just once (as it should)