Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 528643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:00:29+00:00 2026-05-13T09:00:29+00:00

i am building a facebook app which is somehow generating these weird errors. the

  • 0

i am building a facebook app which is somehow generating these weird errors.
the following are the errors I am facing:

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 395

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 395

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 395

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 399

the first few lines in index.php are:

<?php

require_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;   

?>

the lines 394-400 in facebook.php are:

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;

can someone help me solve this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:00:29+00:00Added an answer on May 13, 2026 at 9:00 am

    theres probably some newlines at the top of index.php that are getting outputted before the setcookie call.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Introduction: I am building a facebook app which auto wishes happy birthday. I am
I'm building a Facebook App which grabs the URLs from various sources in a
I am building an facebook app which runs in a tab of a site
I am building an iPhone app which uses Facebook iOS SDK and Three20. I
I am building a Facebook App which is heavy on Javascript. For this I
I'm building a web app that uses the Facebook Graph API which displays all
I am building a small facebook app. Trying to search for values in an
I am building a Facebook canvas app, and the code suppose to be generated
Just getting started building an app using the v6 of the facebook c# sdk
I'm building a batch request for the Facebook API by looping the following code:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.