ioscocoa-touchfacebook-graph-apifacebook-ios-sdkfbconnect

fbconnect API response in iPhone


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)?


Solution

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