Safari and php sessions not working in facebook iframe

前端 未结 3 1284
情深已故
情深已故 2021-02-04 17:04

I\'m having a problem to make my facebook app working on Safari.

The issue is related to the PHP session variables.

I am aware that Safari has a problem dealing

3条回答
  •  北荒
    北荒 (楼主)
    2021-02-04 17:46

    I am late to this but it may well help someone else looking up this problem.

    The only method I could make work was to detect safari from inside my iframe and redirect to another page momentarily where I could set my session cookie - then redirect back.

     
         top.location = "http://www.domain.com/setcookie.php";
         ';
        }
    }
    ?>
    

    Then from setcookie.php

    
    top.location = "http://www.backtooriginaldomain.com"; 
    ';
    ?>
    

    its a bit lame but does work and doesn't interfere with the other browsers. The other method is to use a popup window although my safari had this blocked by default.

提交回复
热议问题