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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T08:58:09+00:00 2026-06-18T08:58:09+00:00

How to get list of friends using my app in an activity using Facebook

  • 0

How to get list of friends using my app in an activity using Facebook API?Currently developing an app with the use of Facebook API to show list of friends to the user whom have installed my app.I have tried using Graph API explorer like “me/friends?fields=name,likes,installed” but i want to know how get the desired result in my Android App Activity.
Now i am able to get this using FQL query:

{Response:responseCode:200, graphObject:GraphObject{graphObjectClass=GrahObject,state=
    {
  "data": [
    {
      "uid": xxxx98471, 
      "name": "ABC"
    }, 
    {
      "uid": xxx425672424, 
      "name": "XYZ"
    }
  ]
},error:null, isFromCache:false}

So how to format this output and display it in proper manner as:
Name: ABC
Name: XYZ
in listview or so…
I have tried using:

public void onCompleted(Response response) {
                GraphObject graphObject = response.getGraphObject();
                String s = textViewResults.getText().toString();
                if (graphObject != null) {
                    if (graphObject.getProperty("id") != null) {
                        s = s + String.format("%s: %s\n", 
                                graphObject.getProperty("id"), 
                                graphObject.getProperty("name"));
                    }
                }
                textViewResults.setText(s);
            }
        }));
    }
    request.executeAsync();

I am getting “null” in the result. So now can anybody tell me how to parse this type of response.Any help would be highly appreciated.

  • 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-06-18T08:58:10+00:00Added an answer on June 18, 2026 at 8:58 am
    public void onCompleted(Response response) {
                    GraphObject graphObject = response.getGraphObject();
                    String s = textViewResults.getText().toString();
                    if (graphObject != null) {
                        JSONObject jsonObject = graphObject.getInnerJSONObject();
                        try {
                         JSONArray array = jsonObject.getJSONArray("data");
                         for (int i = 0; i < array.length(); i++) {
                             JSONObject object = (JSONObject) array.get(i);
                             Log.d(TAG, "id = "+object.get("id"));
                          }
                    } catch (JSONException e) {
    
                     e.printStackTrace();
                    }
             }
                    textViewResults.setText(s);
                }
            }));
    }
    request.executeAsync();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my application I try to get list of friends using Facebook Api method
I'm currently developing an app in facebook which has a list of friends of
Is there anyway to get a list of mutual friends using Facebook's Graph API?
I have all the list of friends which I get using [facebook requestWithGraphPath:@me/friends andDelegate:self];.
I'm trying to get a list of user's friends using fb connect for the
I have requirement to get Facebook friends list with their images. How can I
Im trying to return the friend list of a user using a Facebook app
How to store a Facebook user's friends list in MySQL using PHP? I am
Using javascript I get list of facebook friends though it only returns name and
I am using this sample code https://github.com/chrtatu/FacebookFriendsList to get the list of FB friends

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.