Eye-Fi Code Reference
Debugging Tools
Logger
require_once 'lib/php/EyeFi/Logger/Logger.php';
$log = new Logger('category_name');
$log->info('$access_token: '.$access_token);
Global log level "info" by default on production servers.
Session
require_once 'lib/php/EyeFi/Sessions/Session.php';
$session = new Session();
$session->start();
$session->setVar('api_key', $api_key);
$session->setVar('ssl_session', true);
$session->setVar('user_id', $user_id);
$session->setVar('_force_session_write', true);
$access_token = $session->getId();
$log = new Logger('category_name');
$log->info('$access_token: '.$access_token);
$log->info('$_SESSION: '.print_r($_SESSION, true));
session_write_close();
Cache
require_once 'lib/php/EyeFi/Cache/Cache.php';
$session = new Session();
$session->start();
$cache = new Cache;
$key = sprintf("eyefi2:sessions:1:%s", $session->getId());
$log->info("key: {$key}");
$res = $cache->read($key);
$log->info('$res: '.print_r($res, true));