开发者

How to retrieve Facebook cookies with cross-domain and Safari

I've been working on this problem all day long, so I really need your help.

I'm trying to create a multi-site login system with Facebook Connect and unfortunatly I can't retrieve Cookies.

Here's a little more details:

I'm having a website (www.first.com) which has an iFrame to www.second.com, which display the Facebook Connect button. I have to use this method because a Facebook App is only valid for 1 website, and I will need to use it on multiple. When the user clicks on the button and log into Facebook, he is redirect to www.second.com, which saves values in a database, which is later retrieved on www.first.com

Everything is working fine in Firefox, IE 8/7 works fine too since I've added the P3P header.

The problem is that I can't make it work on Safari, which requires some kind of interaction from this user to the iframe. I found a code ( http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari/ ) but I'm not sure how to use it, I've tried every possible way (I think), and nothing. I guess it doesn't work because I would need to use this on Facebook's server (which i can obviously ;) )

Does anyone have an idea?

Sorry for the huge block of text ;) let me know if you need more informati开发者_运维百科on.


Cross Domain Cookies sounds like a security-bug.

Are you sure you don't offend against the same origin policy?

In fact afaik, you can't access a cookies for first.com from second.com

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜