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

  • SEARCH
  • Home
  • 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 8540539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:37:16+00:00 2026-06-11T11:37:16+00:00

I have this snippet AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook); Bundle bundle = new Bundle();

  • 0

I have this snippet

  AsyncFacebookRunner mAsyncRunner = new AsyncFacebookRunner(mFacebook);
                    Bundle bundle = new Bundle();
                    bundle.putString("fields", "birthday");
                    mAsyncRunner.request("me/friends", bundle, new FriendListRequestListener());

and it works somehow, I mean I can read the ids from all my friends.
But in I want to read everything how can I do that ?

    String _error = null;

        JSONObject json = Util.parseJson(response);
        final JSONArray friends = json.getJSONArray("data");

        for (int i = 0; i < friends.length(); i++) {
            Log.v("id:", "id= "+friends.get(i).toString());
         }

What should I do to get info about my friends and to read that info

I guess this is the key, this is from the example I found and it works fine

bundle.putString("fields", "birthday");

but when I put for example, doesn’t works

bundle.putString("fields", "friends_relationships");

—————–EDIT 1————————-

code for permissions

    mFacebook.authorize(Example.this, new String[] {"offline_access", "user_interests", "friends_interests","friends_relationships","friends_relationship_details"},new DialogListener() {
        @Override
        public void onComplete(Bundle values) {}

        @Override
        public void onFacebookError(FacebookError error) {}

        @Override
        public void onError(DialogError e) {}

        @Override
        public void onCancel() {}
   });

————– EDIT 2 ————–

{“error”:{“message”:”An active access token must be used to query information about the current user.”,”type”:”OAuthException”,”code”:2500}}

  • 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-11T11:37:17+00:00Added an answer on June 11, 2026 at 11:37 am

    Graph API is the smart choice in most cases. To retrieve your friend information you need to collect some extended permissions from the user first. Then you can retrieve a lot more information other than the basic ones.

    Following is a list of extended permissions related to friends different kind of information

    friends_about_me        
    friends_activities      
    friends_birthday
    friends_checkins        
    friends_education_history       
    friends_events
    friends_games_activity      
    friends_groups      
    friends_hometown
    friends_interests       
    friends_likes       
    friends_location
    friends_notes       
    friends_online_presence     
    friends_photo_video_tags 
    friends_photos      
    friends_relationship_details        
    friends_relationships
    friends_religion_politics       
    friends_status      
    friends_subscriptions
    friends_videos      
    friends_website     
    friends_work_history
    

    facebook.authorize(this, new String[] {"offline_access", "user_interests", "friends_interests"},

    Edit :-

    If your app needs more than this basic information to function, you
    must request specific permissions from the user. This is accomplished
    by passing String[] of permissions to the authorize method. The
    following example shows how to ask for access to user’s email address,
    get extended access token and check-in user at a place:

    facebook.authorize(this, new String[] { "email", "publish_checkins" },
    
          new DialogListener() {
               @Override
               public void onComplete(Bundle values) {}
    
               @Override
               public void onFacebookError(FacebookError error) {}
    
               @Override
               public void onError(DialogError e) {}
    
               @Override
               public void onCancel() {}
          }
    );
    

    Look at here for more details.

    Edit :-

     mAsyncRunner.request("me/friends?fields=id,name,birthday,relationship_status", new FriendListRequestListener());
    
    JSONObject json = Util.parseJson(response);
    final JSONArray friends = json.getJSONArray("data");
    
    for(int i=0;i<friends.length();i++)
    {
        JSONObject object = friends.getJSONObject(i);
        Log.i("------------------ Id",object.getString("id"));
        Log.i("------------------ Name",object.getString("name"));
        Log.i("------------------ RelationShip",object.getString("relationship_status"));
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this snippet $clusters = new DirectoryIterator(/agents/); $cluster_array = array(); # Push each
I have this snippet of shell script: am start -n com.android.gallery3d/com.android.gallery3d.app.MovieActivity -d /sdcard/movie.mp4 sleep
I have this snippet of code: var ShopLogicOptions = {}; ShopLogicOptions.params = {orderId: '
I have this snippet of code private Templates retrieveFromCache(String name) { TemplatesWrapper t =
I have this snippet RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond $1
I have this snippet and there are 3 images and 3 folders in the
I have this snippet of code below. I want to pass the value of
I have this jQuery snippet, I have stored the variables to highlight them. var
I have this webservice snippet and i want to print the actual value returned.
I have this code snippet: $(function() { $('.toolbar [id^=button]').on('click', function () { $(this) .css('background-color',

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.