我在iOS應用中包含了Facebook本地共享對話框,以讓用戶共享一些數據。問題是,對話框沒有打開。這是代碼。此外,我傳遞圖像的URL到該方法是正常的?也許,這是問題所在?Facebook SDK for iOS 6.0本地共享對話框
BOOL displayedNativeDialog =
[FBNativeDialogs
presentShareDialogModallyFrom:self
initialText:activityName
image:activityImageURL
url:activityURL
handler:^(FBNativeDialogResult result, NSError *error) {
if (error) {
NSLOG(@"Error occured");
} else {
if (result == FBNativeDialogResultSucceeded) {
NSLOG(@"Success");
} else {
NSLOG(@"No success");
}
}
}];
if (!displayedNativeDialog) {
NSLOG("Window does notdisplayed");
}
你可以通過零而不是圖像的URL來測試你的形象問題。此外,您是否通過iOS 6設置登錄到Facebook系統帳戶? –