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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:31:27+00:00 2026-05-26T08:31:27+00:00

I have integrated the iOs Facebook API into my app successfully. Now, I want

  • 0

I have integrated the iOs Facebook API into my app successfully.
Now, I want to get the Friends of the users.
To get it I use:

[facebook requestWithGraphPath:@"me/friends" andDelegate:self];

And I implement a the delegate method to recieved it:

- (void)request:(FBRequest *)request didLoad:(id)result {

    uids = [[NSMutableArray alloc]init];
    if([result isKindOfClass:[NSDictionary class]])
    {
        NSLog(@"dictionary %@",result);
        result=[result objectForKey:@"data"];
        if ([result isKindOfClass:[NSArray class]]) 

            for(int i=0;i<[result count];i++){

                NSDictionary *result2=[result objectAtIndex:i];
                /*NSLog(@"resultq:%@",result2);

                NSString *result1=[result2 objectForKey:@"id"];
                NSLog(@"uid:%@",result1);*/

                Friend *f = [[Friend alloc] initWithDictionary:result2];
                [uids addObject:f];
                [f release];
            }
        NSLog(@"uids %@",uids);    
    }
}

So I create the object Friend with every Friend of the user.
I get the friends correctly but with a random order.

The question is, there is any way to receive the user’s friends in alphabetical order?

  • 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-26T08:31:28+00:00Added an answer on May 26, 2026 at 8:31 am

    Instead of receiving them in Alphabetical order, why don’t you just re-arrange the array of Friends once you have downloaded all of them. This is the best way to compare an array and sort it alphabetically.

    sortedArray = [anArray sortedArrayUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
    

    But if you want to compare the array by an attribute / variable of the Friends class i.e Name, you can do it the following way:

    sortedArray = [anArray sortUsingSelector:@selector(name)];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have integrated Facebook into my Android App. When a user now posts a
So I am trying to integrate the facebook iOS api into my iphone app.
I have an app for Android and iOS, and I want to integrate video.
I have integrated Facebook into my site, but where is the best place to
I have integrated the Facebook Social Plugin into my Joomla Website. I have a
I'm trying to integrate Twitter with my App right now. I have successfully set
I have integrated NHibernate.Search into my web app by following tutorials from the following
I have integrated facebook connect into my Xcode 4 project for an iPhone. Here
I've integrated the Facebook sso for iOS and have the single sign on implemented
I am trying to integrate Facebook to my iOS app with ARC. To use

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.