iOS SDK 中的 Facebook FQL 多重查询
我正在寻找一些有关如何通过 iOS SDK 向 Facebook 发送多查询 fql 请求的文档或示例代码。 我找到了一些较旧的样本,但它们对我不起作用。 我已经用查询填充了 NSDictionary
,并尝试通过以下方式发送请求 [[FBRequest requestWithDelegate:self] call:@"facebook.fql.multiquery" params:params];
,如我读过的示例中所述,但我收到“无法识别的选择器发送到类”错误,我也无法在 FBRequest.h 中找到“requestWithDelegate”方法。它已被弃用吗? 对此的一些帮助将非常感激!
I am looking for some documentation or sample code on how to send multiquery fql requests to Facebook via iOS SDK.
I found some older samples but they doesnt work for me.
I have populated an NSDictionary
with the queries and I try to send the request via[[FBRequest requestWithDelegate:self] call:@"facebook.fql.multiquery" params:params];
, as stated in the samples I have read, but I get an "unrecognized selector sent to class" error and I cant find the "requestWithDelegate" method in FBRequest.h either. Is it deprecated?
Some help on this would be very appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
委托 FBRequestDelegate 将随响应一起调用。根据您的需要,您将执行以下操作:
Facebook 对象的创建方式如下:
有关如何设置的更多信息可以在此处找到:
https://developers.facebook.com/docs/guides/mobile/
并且取决于对于 FQL 查询,您需要获得用户的权限。请参阅此处的权限列表:
https://developers.facebook.com/docs/authentication/permissions/
有这里还有一个 FQL 查询的测试控制台:
https://developers.facebook.com/docs/reference/rest/fql。 query/
如果你想执行多重查询而不是单个查询,它看起来像:
The the delegate FBRequestDelegate will be call with the response. Depending on your needs, you'll do something like:
The facebook object is created like:
More info on how to set this up can be found here:
https://developers.facebook.com/docs/guides/mobile/
And depending on your FQL query, you will need permissions from the user. See the list of permissions here:
https://developers.facebook.com/docs/authentication/permissions/
There is also a test console for FQL queries here:
https://developers.facebook.com/docs/reference/rest/fql.query/
And if you want to do an Multiquery instead of a single query, it would look like: