来自 facebook graph api、objective-c 的响应

发布于 2024-11-02 23:41:05 字数 203 浏览 3 评论 0原文

我正在编写一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

又爬满兰若 2024-11-09 23:41:05

requestWithGraphPath 返回请求对象,保存它,然后在委托方法 request:didLoad 中使用它来区分您的请求。 request:didLoad 方法将请求作为参数传递给您。

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.

吻风 2024-11-09 23:41:05

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文