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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:04:52+00:00 2026-05-26T12:04:52+00:00

How to catch response in custom function? Basically answer gets: – (void)request:(FBRequest *) request

  • 0

How to catch response in custom function? Basically answer gets:

- (void)request:(FBRequest *) request didReceiveResponse:(NSURLResponse *)response{
NSLog(@"I have some information");
//  [wait stopAnimating];
  //wait.hidden;
}

  - (void)request:(FBRequest *) request didLoad:(id)result{
   if ([result isKindOfClass:[NSArray class]]){
            result = [result objectAtIndex:0];
    } 
    else{
      // dictionaryWithNames = result;
         infoStatus.text = [result objectForKey:@"name"];
     infiId.text = [result objectForKey:@"id"];
}
if ([result objectForKey:@"data"]){
    arrayWithFriends = [result objectForKey:@"data"];
    if (arrayWithFriends != nil) {
    for (NSDictionary *output in arrayWithFriends){
        NSString *namaFriends = [output objectForKey:@"name"];
        NSLog(@"Your Friend %@", namaFriends);
        infoStatus.text = @"If you could see konsole... You can't";
        continue;
        } 
    } else {
        infoStatus.text = @"You Haven't Got friends or Mutuals";
    }
}

}

But i need to have another function because its impossible(or too hard) to get all responses that i need, using only few patterns in this function.

  • 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-26T12:04:53+00:00Added an answer on May 26, 2026 at 12:04 pm

    you can use same schema as facebook developers in their sample application here

    https://github.com/facebook/wishlist-mobile-sample/blob/master/iOS/Wishlist/Wishlist/HomeViewController.m

    they create currentAPIcall variable and fill it depending on request like that:

    /**
    * Make a Graph API Call to get information about the current logged in user.
    */
    - (void) apiFQLIMe {
    
        currentAPICall = kAPIFQLMe;
        // Using the "pic" picture since this currently has a maximum width of 100 pixels
    
        // and since the minimum profile picture size is 180 pixels wide we should be able
        // to get a 100 pixel wide version of the profile picture
    
        NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
    
                                       @"SELECT uid, name, pic FROM user WHERE uid=me()", @"query",
    
                                       nil];
        [facebook requestWithMethodName:@"fql.query"
    
                                         andParams:params
                                     andHttpMethod:@"POST"
    
                                       andDelegate:self];
    }
    
    
    
    
    - (void)request:(FBRequest *)request didLoad:(id)result {
        [self hideActivityIndicator];
        if ([result isKindOfClass:[NSArray class]]) {
            result = [result objectAtIndex:0];
        }
        switch (currentAPICall) {
            case kAPIFQLMe:
            {
                // This callback can be a result of getting the user's basic
                // information or getting the user's permissions.
                if ([result objectForKey:@"name"]) {
                    // If basic information callback, set the UI objects to
                    // display this.
                    self.profileNameLabel.text = [result objectForKey:@"name"];
                    // Get the pr
    

    …

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

Sidebar

Related Questions

I have setup custom error as follows.. protected void Application_Error(Object sender, EventArgs e) {
Im working on a response filter. Im trying to catch all expresion: $sometext.sometext$ with
How do you catch a custom event raised by a master page? On my
I'm wondering how one can catch and add a custom handler when empty results
I have configured result as follows : Its my custom result type. <result-types> <result-type
I have a java servlet that throws a custom error 403 (Forbidden) when the
I have a try catch block to handle an error I am getting with
We have an HttpHandler that deals directly with binary posts over HTTP from custom
I have a custom class, Customer. I want to show a JQuery message on
Should I catch exceptions for logging purposes? public foo(..) { try { ... }

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.