ios – FBSDKShareDialog应该发布时取消

ios – FBSDKShareDialog应该发布时取消,第1张

概述我在代码中创建了一个FBSDKShareDialog - (void)shareWithFacebookDialog;{ FBSDKShareLinkContent* content = [[FBSDKShareLinkContent alloc] init]; content.contentURL = [NSURL URLWithString:@"Path Redacted"]; 我在代码中创建了一个FBSDKShareDialog
- (voID)shareWithFacebookDialog;{    FBSDKSharelinkContent* content = [[FBSDKSharelinkContent alloc] init];  content.contentURL = [NSURL URLWithString:@"Path Redacted"];  content.contentTitle = @"Title Redacted";  content.contentDescription = @"Description Redacted";  FBSDKShareDialog* dialog = [[FBSDKShareDialog alloc] init];  [dialog setMode:FBSDKShareDialogModeNative];  [dialog setShareContent:content];  [dialog setDelegate:self];  [dialog setFromVIEwController:self];  [dialog show];}

对话框启动并且所有的信息是正确的

但是一旦点击了Post,对话框就会关闭,并且cancel代理被调用.

- (voID)sharerDIDCancel:(ID<FBSDKSharing>)sharer;

有没有人看到这个?找到了一种克服它的方法?

解决方法 用这个代替你的代码
- (voID)shareWithFacebookDialog;{      FBSDKSharelinkContent content = [[FBSDKSharelinkContent alloc]init];    content.contentURL = [NSURL URLWithString:@"https://www.Google.com"];    content.contentTitle = @"ContentTitle";    content.contentDescription = @"ContentDescription";    [FBSDKShareDialog showFromVIEwController:self                                 withContent:content                                    delegate:self];}

告诉我是否有效

总结

以上是内存溢出为你收集整理的ios – FBSDKShareDialog应该发布取消全部内容,希望文章能够帮你解决ios – FBSDKShareDialog应该发布时取消所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/1113457.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存