/**
     * Create the client.
     * @param string $session_key if you haven't gotten a session key yet, leave 
     *                            this as null and then set it later by just 
     *                            directly accessing the $session_key member 
     *                            variable.
     */
    public function __construct($api_key, $secret, $session_key = null)
    {
        $this->secret = $secret;
        $this->session_key = $session_key;
        $this->api_key = $api_key;
        $this->last_call_id = 0;
        $this->server_addr = FacebookAPI::get_facebook_url('api') . '/restserver.php';
        if ($GLOBALS['facebook_config']['debug']) {
            $this->cur_id = 0;
            ?>
<script type="text/javascript">
var types = ['params', 'xml', 'php', 'sxml'];
function toggleDisplay(id, type) {
  for each (var t in types) {
    if (t != type || document.getElementById(t + id).style.display == 'block') {
      document.getElementById(t + id).style.display = 'none';
    } else {
      document.getElementById(t + id).style.display = 'block';
    }
  }
  return false;
}
</script>
<?php 
        }
    }