fbconnect API response in iPhone

2019-01-27 10:29发布

问题:

I am calling the FaceBook API like this:

-(IBAction)testBtnAct:(id)sender{
    [facebookObj requestWithGraphPath:@"me" andDelegate:self];
}
-(IBAction)test1BtnAct:(id)sender{
    [facebookObj requestWithGraphPath:@"me/friends" andDelegate:self];
}
- (void)request:(FBRequest *)request didLoad:(id)result {
    NSLog(@"request didLoad..%@",result);
};

The issue is that if I am clicking the both button(testBtnAct and test1BtnAct) and then output comes into - (void)request:(FBRequest *)request didLoad:(id)result in result variable.

Then how do we know which result comes result valuable (i.e for me OR me/friends)?

回答1:

You could check the request url string of your request parameter in the didload method.