简体   繁体   English

Facebook SDK 3.5 - 在iOS 5上分享对话框

[英]Facebook SDK 3.5 - Share Dialog on iOS 5

Does anybody know if it is possible to use new Share Dialog feature on iOS 5 ? 有人知道是否可以在iOS 5上使用新的Share Dialog功能? On the facebook official documentation, it is written : 在facebook官方文档中,它写道:

Note: You can only test the Share dialog on a device that has Facebook for iOS 6.0 or greater. 注意:您只能在具有Facebook for iOS 6.0或更高版本的设备上测试“共享”对话框。 You may also not have access to test this feature while it's in the beta phase.** 您可能无法在测试阶段测试此功能。**

How many time will this feature stay in beta phase? 该功能将在多久停留在测试阶段?

The Facebook SDK 3.5 for iOS runs on iOS 5.0 and greater. 适用于iOS的Facebook SDK 3.5可在iOS 5.0及更高版本上运行。 The Native Share Dialog feature works on OS versions supported by the SDK. Native Share Dialog功能适用于SDK支持的OS版本。 The docs are actually referring to the version of the Facebook application, and are admittedly easy to mistake for referring to the OS version. 文档实际上指的是Facebook应用程序的版本,并且很容易错误地引用操作系统版本。 We will clarify the docs to avoid further confusion on this point. 我们将澄清文档以避免在这一点上进一步混淆。 Thanks for the question! 谢谢你的提问!

For ios5, you can use the older web dialog. 对于ios5,您可以使用旧的Web对话框。 You can invoke it with something like this: 您可以使用以下内容调用它:

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 {

                     }
                 }];

You can test if the native dialog is available by capturing the return value presentShareDialogModallyFrom: in FBNativeDialogs. 您可以通过在FBNativeDialogs中捕获返回值presentShareDialogModallyFrom:来测试本机对话框是否可用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM