Facebook应用程序邀请iOS集成错误
当我尝试使用以下代码打开Facebook应用程序邀请时,我的应用程序因以下原因崩溃:Facebook应用程序邀请iOS集成错误,ios,objective-c,facebook-ios-sdk,Ios,Objective C,Facebook Ios Sdk,当我尝试使用以下代码打开Facebook应用程序邀请时,我的应用程序因以下原因崩溃:-[NSTaggedPointerString containsObject:]:无法识别的选择器发送到实例 FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init]; content.appLinkURL = [NSURL URLWithString:@"https://fb.me/565305550289696"]; //opti
-[NSTaggedPointerString containsObject:]:无法识别的选择器发送到实例
FBSDKAppInviteContent *content =[[FBSDKAppInviteContent alloc] init];
content.appLinkURL = [NSURL URLWithString:@"https://fb.me/565305550289696"];
//optionally set previewImageURL
content.appInvitePreviewImageURL = [NSURL URLWithString:@"https://www.google.co.in/logos/doodles/2015/holidays-2015-day-3-6399865393250304.2-res.png"];
// present the dialog. Assumes self implements protocol `FBSDKAppInviteDialogDelegate`
[FBSDKAppInviteDialog showFromViewController:shareAlertController withContent:content delegate:self];
我做了Facebook开发者网站上提到的所有设置,还创建了适当的Applink
出现此错误的原因是什么?我添加了
lsapplicationqueryschemes
使用数组类型键入info plist。只需右键单击Info.plist
和作为源代码打开即可。并在其中添加以下代码
<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fb-messenger-api</string>
<string>fbauth2</string>
<string>fbshareextension</string>
</array>
LSApplicationQueriesSchemes
fbapi
fb messenger api
fbauth2
fbshareextension
您应该尝试按此答案中所述的操作异常断点:这将为您提供崩溃的确切位置。如果我们能弄清楚问题出在哪里,他们可能会担心。