iOS Facebook应用邀请:错误 [英] iOS Facebook app invite: error

查看:151
本文介绍了iOS Facebook应用邀请:错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在我的iOS应用中实现Facebook邀请. 我在下面的参考链接: https://developers.facebook.com/docs/app-invites/ios

I have to implement Facebook invite in my iOS app. I am following below reference link: https://developers.facebook.com/docs/app-invites/ios

和 根据以下链接创建了应用程序链接:

and created app link as per below link:

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 委托方法

func appInviteDialog(appInviteDialog: FBSDKAppInviteDialog!, didFailWithError error: NSError!) {
    println("didFailWithError: \(error)")

}

我的plist设置为

My plist setting is

我的代码如下:

@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)
}

请提出任何解决方案,以显示邀请弹出窗口并成功工作.

Pls suggest any solution, to show invite pop up and work successfully.

谢谢.

推荐答案

确保您的AppDelegate中具有[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];.我花了两天的时间来解决这个问题.

Make sure you have [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; in your AppDelegate. I've spend two days while trying to fix that.

这篇关于iOS Facebook应用邀请:错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆