[英]Facebook SDK 3.5 - Share Dialog on iOS 5
有人知道是否可以在iOS 5上使用新的Share Dialog功能? 在facebook官方文檔中,它寫道:
注意:您只能在具有Facebook for iOS 6.0或更高版本的設備上測試“共享”對話框。 您可能無法在測試階段測試此功能。**
該功能將在多久停留在測試階段?
適用於iOS的Facebook SDK 3.5可在iOS 5.0及更高版本上運行。 Native Share Dialog功能適用於SDK支持的OS版本。 文檔實際上指的是Facebook應用程序的版本,並且很容易錯誤地引用操作系統版本。 我們將澄清文檔以避免在這一點上進一步混淆。 謝謝你的提問!
對於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:來測試本機對話框是否可用。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.