- (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应该发布时取消所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)