来自 facebook graph api、objective-c 的响应
我正在编写一个 iPhone 应用程序,它通过 graph-api 向 facebook 发布一些查询。我的问题是,我想在同一个“- (void)request:(FBRequest *)request didLoad:(id)result”中处理来自不同 FQL 查询的结果,但我还没有找到一种方法来识别响应是针对哪个查询的。 我可以使用 ID 或其他内容标记我的请求以在响应中识别它吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
requestWithGraphPath
返回请求对象,保存它,然后在委托方法request:didLoad
中使用它来区分您的请求。request:didLoad
方法将请求作为参数传递给您。requestWithGraphPath
returns the request object, save it and then in the delegate methodrequest:didLoad
use it to differenciate your requests. The methodrequest:didLoad
is passing you the request as a parameter.Hii Jonas,
我还必须在一个视图中调用 FQL/GRaph/Checkins API,因此我编写了单独的模型对象类 - 然后使该类将结果返回到视图,就像编写协议一样,否则使用多个协议不是一个好主意自 requestDidLoad 以来的 FB 请求返回任何 FB 操作的结果。
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.