有人知道是否可以在iOS 5上使用新的Share Dialog功能? 在facebook官方文档中,写道:
注意:您只能在具有适用于iOS 6.0或更高版本的Facebook的设备上测试“共享”对话框。您可能无法在测试阶段测试此功能。**
此功能将在多久停留在测试阶段?
答案 0 :(得分:7)
适用于iOS的Facebook SDK 3.5可在iOS 5.0及更高版本上运行。 Native Share Dialog功能适用于SDK支持的OS版本。文档实际上指的是Facebook应用程序的版本,并且很容易错误地引用操作系统版本。我们将澄清文档以避免在这一点上进一步混淆。谢谢你的问题!
答案 1 :(得分:0)
对于ios5,您可以使用旧的Web对话框。您可以使用以下内容调用它:
NSMutableDictionary *params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
@"name/title of post", @"name",
@"some description", @"description",
@"url to link to", @"link",
nil];
// Invoke the dialog
[FBWebDialogs presentFeedDialogModallyWithSession:nil parameters:params handler:
^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {
if (error) {
// Error launching the dialog or publishing a story.
NSLog(@"Error publishing story.");
} else {
}
}];
您可以通过在FBNativeDialogs中捕获返回值presentShareDialogModallyFrom:来测试本机对话框是否可用。