8

Good evening,

I've asked this question a couple of times without responses, hope this time goes well. I've been developing facebook apps for a couple of years now, using php and the Facebook PHP SDK. Lately I've been struggling with Safari and the login with Facebook.

The problem is that Safari 6 has checked by default the "Block 3rd party cookies" option, so my app can't set the cookies automatically. I'm seeing this only in Safari, the cookies are empty, unlike Chrome or Firefox, both are saving cookies well.

I'm logging in the user with the Facebook PHP SDK example, so I don't know where the problem is. I've read a lot of "solutions" but are not up to date and don't work for Safari 6.

Is there a way to set the cookies manually or a trick to tell the browser that this is a secure site?

I don't really know if I'm asking the right question. I'm desperate about this issue, really, I've tried everything and I could use some help, anything would help.

Thank you very much!

chuysbz
  • 1,262
  • 6
  • 18
  • 47
  • The Safari 3rd party cookie problem has been discussed multiple times here before, so please do some (re)search. – CBroe Feb 15 '13 at 13:26
  • Yeah, I know, but none of the past discussions/answers has worked for me. – chuysbz Feb 15 '13 at 15:17
  • http://stackoverflow.com/questions/1144894/safari-doesnt-set-cookie-but-ie-ff-does – Dom Feb 20 '13 at 02:50
  • https://www.stackoverflow.com/questions/9930671/safari-3rd-party-cookie-iframe-trick-no-longer-working/10098007#10098007 – Igy Feb 20 '13 at 18:39

4 Answers4

1

have you tried any of these Setting cross-domain cookies in Safari

Safari6 out of box, doesn't allow cross domain cookies which is the problem.

Community
  • 1
  • 1
Jessie Frazelle
  • 635
  • 5
  • 9
1

You can set the cookie manually with php:

setcookie(name, value, expire, path, domain);

http://php.net/manual/en/features.cookies.php

Or is this what you are already using?

Also, try using p3p headers.

<?
  header('P3P: CP=HONK');
  setcookie('test_cookie', '1', 0, '/');
?>
Bennett
  • 15
  • 5
0

Have you tried PHP sessions? If I remember correctly, you can set session.use_only_cookies to 0 so that the IDs are passed using SID.

Yimin Rong
  • 1,890
  • 4
  • 31
  • 48
0

Have you tried the solution specified in this blog with a heading update 2.

http://www.reizbombardement.de/archives/safari-5-1-4-enforces-cookie-policy

I expect it works here.