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 6200969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:27:59+00:00 2026-05-24T04:27:59+00:00

I am making a request to the facebook api to get a list of

  • 0

I am making a request to the facebook api to get a list of friends. When I make the request through node.js, my request is always truncated. Does anyone understand why the response is being truncated?

Here is the code of my function:

var loadFriends;
loadFriends = function(access_token, callback) {
  var https, options, start;
  https = require('https');
  start = new Date();
  options = {
    host: 'graph.facebook.com',
    port: 443,
    path: '/me/friends?access_token=' + access_token
  };
  return https.get(options, function(res) {
    console.log("Request took:", new Date() - start, "ms");
    res.setEncoding("utf8");
    return res.on("data", function(responseData) {
      var data;
      console.log(responseData);
      data = JSON.parse(responseData);
      return callback(data);
    });
  });
};
  • 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-24T04:28:00+00:00Added an answer on May 24, 2026 at 4:28 am

    The res.on('data') event will happen multiple times as chunks of data arrives; you need to concatenate this together to get the whole response.

    http://nodejs.org/docs/v0.4.0/api/http.html#event_data_

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

Sidebar

Related Questions

I have the following code making a GET request on a URL: $('#searchButton').click(function() {
I've encountered several issues while trying to get Facebook's Graph API work in IE.
I am using facebook latest iphone sdk, I am making multiple request to facebook
Question: How to delete an application request using the facebook-actionscript-api? I am trying to
I'm making a request from an UpdatePanel that takes more then 90 seconds. I'm
I am making a request to a CGI program using AJAX. The response sends
Okay so here's what I'm doing. I'm making a request to a server to
I am making an ajax request from a jquery script to one of my
I am making an http request which ends up taking more than 8 mins.
I am making an ajax request to my servlet and the servelt responds with

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.