简体   繁体   中英

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 ? On the facebook official documentation, it is written :

Note: You can only test the Share dialog on a device that has Facebook for iOS 6.0 or greater. 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. The Native Share Dialog feature works on OS versions supported by the SDK. The docs are actually referring to the version of the Facebook application, and are admittedly easy to mistake for referring to the OS version. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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