Last active
December 22, 2015 00:48
-
-
Save derekaug/6391676 to your computer and use it in GitHub Desktop.
Workaround for third party cookies in Safari...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Start Session Fix | |
session_start(); | |
$page_url = "http://www.facebook.com/pages/For-Testing/49209188225?sk=app_166147000244773"; | |
if (isset($_GET["start_session"])) | |
{ | |
die(header("Location:" . $page_url)); | |
} | |
$sid = session_id(); | |
if (!isset($_GET["sid"])) | |
{ | |
if(isset($_POST["signed_request"])) | |
{ | |
$_SESSION["signed_request"] = $_POST["signed_request"]; | |
} | |
die(header("Location:?sid=" . $sid)); | |
} | |
if (empty($sid) || $_GET["sid"] != $sid) | |
{ | |
die('<script>top.window.location="?start_session=true";</script>'); | |
} | |
// End Session Fix | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment