简体   繁体   English

适用于iOS的Facebook SDK 4.0 App邀请

[英]Facebook SDK 4.0 App Invites for iOS

I am using Facebook SDK version 4.0. 我正在使用Facebook SDK 4.0版。 I am trying to make a demo for App Invite. 我正在尝试制作App Invite演示。 I am following all the steps mentioned on the Facebook Developer Docs. 我正在执行Facebook开发人员文档中提到的所有步骤。

I can see my passed app link and image on when FB Invite Dialog opens, Even I can able to see my friends and select among them. 当“ FB邀请对话框”打开时,我可以看到传递的应用程序链接和图像,甚至我也可以看到我的朋友并在其中选择。 After that I am getting issue. 之后,我遇到了问题。 Dialog shows error but no description. 对话框显示错误,但没有描述。 Please see attached screenshot. 请参阅附件的屏幕截图。

If anyone have implemented it then help me out. 如果有人实施了,那就帮帮我。

在此处输入图片说明

I used below code, 我用下面的代码,

FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] initWithAppLinkURL:[NSURL URLWithString:@"My App Link"]];
    //optionally set previewImageURL
    content.previewImageURL = [NSURL URLWithString:@"<preview image>"];

    // present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate`
    [FBSDKAppInviteDialog showWithContent:content
                                 delegate:self];

I was having same issue. 我有同样的问题。

In my case,I was using my website URL as my App Link URL and My website was having wrong fbAppId in its meta data, which caused this issue. 以我为例,我将网站URL用作应用程序链接URL,而我的网站的元数据中有错误的fbAppId,这导致了此问题。

确保您的Facebook应用程序处于活动状态,这意味着您必须填写一些信息,根据我报告的错误,他们说,对于不需要自己使用的测试,只需提供有效信息即可,例如有效的App Store ID在您的Developer iOS设置和隐私政策网址中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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