开发者

How is facebook connect pop up window designed?I

I click on connect to facebook and a pop takes me directly to the facebook domain from the iframe which belongs to mydomain. But after successfull 开发者_开发技巧authentication how does it automatically close and get to the event handle?

In other words, whats going on behind FB.login()?


Once it receives a successful auth key, It will close the dialog window. Just like OAuth works when you get a code on a successful authentication


I havent researched this, but this is my guess: I think Facebook is setting a signed cookie on the client's machine if there is a successful authentication. The Facebook JS library recognizes this cookie when it's set and closes the window.


EDIT: It uses postMessage supported by HTML5 to support cross window cross domain communication!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜