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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:45:30+00:00 2026-05-23T12:45:30+00:00

I need to get basic user data from Facebook using FB.api(‘/<some_id>/’) . This works

  • 0

I need to get basic user data from Facebook using FB.api('/<some_id>/'). This works well, but is slow, since I need to ask for every id separately and make several calls to facebook. Is there any way to gather all ids and ask for them in single request and get an array?

EDIT

I am not asking for user friends. I am actually trying to gather friends’ friends of a user and that’s something Facebook doesn’t provide, that’s why I am using graph.facebook.com/<id>/ rather than graph.facebook.com/me/friends. I don’t want friends, I’d like to do something like this: graph.facebook.com/<id1>,<id2>,<id3>,../

  • 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-23T12:45:31+00:00Added an answer on May 23, 2026 at 12:45 pm

    How about using FQL:

    From the Facebook examples:

    var friends = FB.Data.query(
         "(select uid2 from friend where uid1 = {0})",
         user_id);
    
    var friendsoffriends = FB.Data.query(
         "select uid2 from friend where uid1 in (select uid2 from {0})",
         friends;
    
     // Now, register a callback
     FB.Data.waitOn([friends, friendsoffriends], function() {   
       // now display all the results
       FB.Array.forEach(friendsoffriends.value, function(row) {
           console.log(row.uid);
       });
     });
    

    Then edit for whatever collection of ids you wish to use.

    The above approach remains valid (as a reasonable generic example) – however, to clarify:

    You would previously have used users.getInfo to do what you are asking, as this allows you to pass a list of UIDS. Unfortunately this is being deprecated. However, all this query actually does is wrap an FQL query.

    If you then apply the standard FQL ‘in’ syntax you can achieve this:

    {
    myfriends:'select uid2 from friend where uid1=me()',
    friendsoffriends:'select uid2 from friend where uid1 in (select uid2 from #myfriends)'
    }
    

    However facebook actively prevents you from doing this with the error:

    "error_code": 604,
      "error_msg": "Can't lookup all friends of 123456789. Can only lookup for the logged in user (987654321), or friends of the logged in user with the appropriate permission",
    

    Your other option is to get all of the ids and do an FQL query of the form:

    select name from user where uid='123456789' OR uid='987654321' OR uid=...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our application we need to import transaction data from paypal through an API
I need to get the default printer name. I'll be using C# but I
I need to get a log of user access to our SQL Server so
I'm using Facebook Graph API on Google App Engine. I was able to fetch
I'm working with C#.net developing applications for windows mobile 6, and i need get
I need to get the first and last day of a month in the
I need to get some information that is contained in the MFT on a
I need to get the name of the machine my .NET app is running
I need to get the value of the 'test' attribute in the xsl:when tag,
I need to get UTF-8 working in my Java webapp (servlets + JSP, no

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.