我必须在我的 iOS 应用程序中实现 Facebook 邀请。 我正在关注以下引用链接: https://developers.facebook.com/docs/app-invites/ios
和 根据以下链接创建应用程序链接:
https://developers.facebook.com/docs/applinks
我面临以下错误:-
Error Domain=com.facebook.sdk.core Code=9 "The operation couldn’t be completed. (com.facebook.sdk.core error 9.)"
在下面的FBSDKAppInviteDialogDelegate委托(delegate)方法中
func appInviteDialog(appInviteDialog: FBSDKAppInviteDialog!, didFailWithError error: NSError!) {
println("didFailWithError: \(error)")
}
我的代码如下:
@IBAction func btnInviteClicked(sender: UIBarButtonItem) {
var content: FBSDKAppInviteContent = FBSDKAppInviteContent()
content.appLinkURL = NSURL(string: "https://fb.me/MyFacebookAppLinkURL")
//Optional
content.appInvitePreviewImageURL = NSURL(string: "AnyImageURL")
FBSDKAppInviteDialog.showWithContent(content, delegate: self)
}
请提出任何解决方案,以显示邀请弹出窗口并成功工作。
提前致谢。
最佳答案
确保您的 AppDelegate 中有 [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];
。我花了两天时间试图解决这个问题。
关于facebook-ios-sdk - iOS Facebook 应用邀请 : error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32331116/