jonasonline
jonasonline

Reputation: 117

Responses from facebook graph api, objective-c

Iam writing an iPhone application which is posting a few queries to facebook via the graph-api. My problem is that I want to handle results from different FQL queries in the same "- (void)request:(FBRequest *)request didLoad:(id)result" but I havent found a way identify which query the response is for. Can I tag my request with an ID or something to identify it in the response?

Upvotes: 0

Views: 660

Answers (2)

Sukas
Sukas

Reputation: 267

Hii Jonas,

i have also to call FQL/GRaph/Checkins API in one View , so i write separated Model Object Class - then make that class to return Results to the View like writing a Protocol otherwise it s not a good idea to use multiple FB Request since requestDidLoad returns results for any FB Actions.

Upvotes: 1

albertamg
albertamg

Reputation: 28572

requestWithGraphPath returns the request object, save it and then in the delegate method request:didLoad use it to differenciate your requests. The method request:didLoad is passing you the request as a parameter.

Upvotes: 3

Related Questions