$_SESSION vars created outside of Drupal lost when navigating to a Drupal served page I'm building a Facebook iframe app in Drupal.

I'm using an initial simple PHP script (non-Drupal driven) to handle the Facebook open auth side of things - this script is getting the Facebook user's name, id, profile pic etc.
This script stores those values to session vars. Then it redirects the user to a page served by Drupal.

My understanding looking at the D7 session.inc is that pre-existing session vars should be maintained when Drupal session start is called. But if I print_r() the $_SESSION array, it is empty.

So essentially a plain PHP script saying:

session_start();
$_SESSION['name'] = 'bob';


sets the session correctly.
But when then adding a redirect (header()) to a Drupal served page I can no longer get that name variable and the session is empty. 

Any suggestions/tips?

Thanks,
Steve
A really good source related to your question from drupal.org's forum:
Struggling with Session Variables (the $_SESSION array) when redirecting to external php scripts

The key for codes outside Drupal's full control to work is to save PHP's current working directory, change it to Drupal's, requiring the needed file to bootstrap Drupal (includes/bootstrap.inc), pass the appropriate $cookie_domain variable ("the domain to be used for session cookies"!), bootstrapping Drupal, and then change the current working directory back to the original. After this, you can write your own codes and use Drupal's functions, mess with its session variables, etc. - of course, depending on the bootstrapping mode of Drupal.

The code to achieve it looks like this (you have to change $your_drupal_directory variable to yours, usually this is in the root, but its path can be different [e.g. if it's in a subdirectory]):

// ...

/**
 * @see http://drupal.org/node/575002
 */

// store current working directory
$currdir=getcwd();
// which is your Drupal directory? (usually it's in the root, but can be different)
$your_drupal_directory = $_SERVER['DOCUMENT_ROOT'];
// change PHP's current directory to Drupal's
chdir($your_drupal_directory);
// including bootstrap file...
require_once("./includes/bootstrap.inc");

// The domain to be used for session cookies. (see: http://api.drupal.org/api/drupal/developer!globals.php/global/cookie_domain/7)
$cookie_domain = $_SERVER['HTTP_HOST'];

// DRUPAL_BOOTSTRAP_SESSION: initialize session handling.
drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);

// the code above should be enough for your task, but if you want Drupal to be "fully loaded, validate and fix input data", you could try the following too (see: http://api.drupal.org/api/drupal/includes%21bootstrap.inc/function/drupal_bootstrap/7)
// drupal_bootstrap( DRUPAL_BOOTSTRAP_FULL );

// change PHP's current directory BACK to the original
chdir($currdir);

// ...
// YOUR OWN CODE COMES HERE
// ...