本文介绍了fbconnect API响应在iPhone的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我这样调用FaceBook API:

   - (IBAction)testBtnAct:(id)sender {
[facebookObj requestWithGraphPath:@meandDelegate:self];
}
- (IBAction)test1BtnAct:(id)sender {
[facebookObj requestWithGraphPath:@me / friendsandDelegate:self];
}
- (void)request:(FBRequest *)request didLoad:(id)result {
NSLog(@request didLoad ..%@,result);
};问题是,如果我单击两个按钮(testBtnAct和test1BtnAct),然后输出进入 - (void)request:(FBRequest *)request didLoad:(id)result in result >

那么我们如何知道哪个结果 result 有价值(即 me OR me / friends )?

解决方案

请求didload方法中的请求参数的url字符串。


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

解决方案

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

这篇关于fbconnect API响应在iPhone的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 01:39