重定向到另一个域后无法获取会话变量

I have created session on one page and unable to get these session on another page, how can I able to get session on another page.

page1.php

$_SESSION['access_token']        = "token";
$_SESSION['access_secret']       = "secret";
$_SESSION['session_handle']      = "handle";
header("Location: mydomain/page2.php");

page2.php

session_start();
if(isset($_SESSION['access_token'])) {
     echo $_SESSION['access_token'];
} else {
    echo "";
}

I have tried above code with same domain or different domain.

Try to put session_start();in page1.php (on first line). If the domains are different will not work

If first page and second page are on different domains then it can't be done because sessions are stored on the server.You can't pass it from one domain to another domain.

Otherwise If both the pages are on the same server then it could be because you didn't start the session in first page.