[英]How to know which request a FB Graph's response respond to?
I make a call to FB graph api using FB IOS and handle the response in a delegate object which conforms to FBRequestDelegate. 我使用FB IOS调用FB graph api,并在符合FBRequestDelegate的委托对象中处理响应。 The handle functions is 句柄功能是
- (void)request:(FBRequest *)request didLoad:(id)result;
My question is that how do I know which request this response respond to if two requests with same graph path are made? 我的问题是,如果发出两个具有相同图形路径的请求,我如何知道该响应响应哪个请求?
Look into FBRequest 调查FBRequest
@interface FBRequest : NSObject {
id<FBRequestDelegate> _delegate;
NSString* _url;
NSString* _httpMethod;
NSMutableDictionary* _params;
NSURLConnection* _connection;
NSMutableData* _responseText;
FBRequestState _state;
NSError* _error;
BOOL _sessionDidExpire;
}
is there any of these instance variable can be used to distinguish between requests with same graph path? 这些实例变量中是否有一个可用于区分具有相同图形路径的请求?
Thanks 谢谢
you can check the request url .. im currently dealing with it like this .. for example 您可以检查请求网址..即时通讯当前正在处理像这样..例如
if([request.url rangeOfString:@"me/feed"].location !=NSNotFound)
{
//Do something
}
else if([request.url rangeOfString:@"fql.query"].location !=NSNotFound)
{
//Do something
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.