Normally, this page would be reloaded if user finished authorized your app. But it won't be reloaded in Chrome due to the follwing error:
Some people use FB.getLoginStatus() to check if user authorized app at page loaded. If page could be reloaded, it's no problem. However, in this case, it's not.
There are several questions on StackOverflow related to this:
But none of these solves my problem. I don't want to solve this with introduce PHP sdk. I would like to solve it with pure front end codes.
Therefore, I find 3 solutions:
- Ignore the error and register login event to solve the problem:
- Add attribute "show-faces="true"" to <fb:login-button> to solve
- Add attribute "render-in-iframe="true"" to <fb:login-button> to solve. This is a bad idea since this is an undocumented attribute.
In solution 2 and 3, login-button seems to be placed into an iframe. And 3 would display an incomplete login button (bug?)