php header errors in facebook app

Daaneo

New Member
i am building a facebook app which is somehow generating these weird errors.the following are the errors I am facing:\[code\]Warning: Cannot modify header information - headers already sent by (output started at /home/amitver/public_html/roadies/index.php:2) in /home/amitver/public_html/roadies/facebook.php on line 395Warning: Cannot modify header information - headers already sent by (output started at /home/amitver/public_html/roadies/index.php:2) in /home/amitver/public_html/roadies/facebook.php on line 395Warning: Cannot modify header information - headers already sent by (output started at /home/amitver/public_html/roadies/index.php:2) in /home/amitver/public_html/roadies/facebook.php on line 395Warning: Cannot modify header information - headers already sent by (output started at /home/amitver/public_html/roadies/index.php:2) in /home/amitver/public_html/roadies/facebook.php on line 399\[/code\]the first few lines in index.php are:\[code\]<?phprequire_once 'facebook.php';//facebook init $appapikey = '...'; $appsecret = '...'; $facebook = new Facebook($appapikey, $appsecret); $user_id = $facebook->require_login(); $userInfo = $facebook->api_client->users_getInfo($user_id, array('name')); $name = $userInfo[0]['name']; //$useruidname = $facebook->api_client->fql_query("SELECT name FROM user WHERE uid='$user_id'"); // Greet the currently logged-in user! echo 'Hello, '.$name; ?>\[/code\]the lines 394-400 in facebook.php are:\[code\]foreach ($cookies as $name => $val) { setcookie($this->api_key . '_' . $name, $val, (int)$expires, '', $this->base_domain); $_COOKIE[$this->api_key . '_' . $name] = $val;}$sig = self::generate_sig($cookies, $this->secret);setcookie($this->api_key, $sig, (int)$expires, '', $this->base_domain);$_COOKIE[$this->api_key] = $sig;\[/code\]can someone help me solve this?
 
Back
Top