Closed RyanTLX closed 10 years ago
You could set tag on each request or keep the reference of request and check it on delegate.
Is it possible for you to elaborate what do you mean by setting a tag on a request, or keeping a reference of a request and checking it on delegate?
....
IGRequest *request = [appDelegate.instagram requestWithParams:params delegate:self];
request.tag = FOLLOWERS_REQ_TAG;
....
- (void)request:(IGRequest *)request didLoad:(id)result {
if (request.tag == FOLLOWERS_REQ_TAG) {
// is my request
}
}
Great! I had to to go IGRequest.h to add a tag property first before that could work. Thanks!
@property(nonatomic) int tag;
Yes, sorry was my wrong. If you don't want change the library keep the reference of the request from 'requestWithParams....'
When a view is loaded, I send out 2 requests, 1st is requesting for users/self/feed" (user feed), and 2nd is requesting for "users/self" (user info).
Those 2 requests may not be returned in the order that I have requested them. Is there a way that I can differentiate between the 2 requests since Instagram always returns the JSON dictionary as "data"?
Otherwise the next solution I can think of, which I don't prefer, is to wait till I receive the results of the 1st request before I start sending the 2nd request.