【发布时间】:2015-05-24 02:04:04
【问题描述】:
我正在尝试开发用户可以邀请他们的 Facebook 朋友使用该应用程序的应用程序。由于新的 4.0 SDK,我很难找到一个好的逐步解决这个问题的方法。
我无法让这段代码工作,因为我有两个错误
1)presentRequestsDialogModallyWithSession 没有已知的类方法选择器
2) 预期的 "(" 与 "handler:^(FBSDKAppInviteDialog result, NSURL *resultURL, NSError *error)
以下代码在我的按钮的 IBAction 中,一旦单击该按钮,应将用户引导至其 Facebook 好友列表。
[FBSDKAppInviteDialog
presentRequestsDialogModallyWithSession:nil
message:NSLocalizedString(@"FBinviteMessage", nil)
title:nil
parameters:nil
handler:^(FBSDKAppInviteDialog result, NSURL *resultURL, NSError *error) {}
];
【问题讨论】: