我们可以使用以下代码发布链接内容:
FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL =
[NSURL URLWithString:@"http://www.google.com"];
content.contentTitle=@"Sample app Teja";
content.contentDescription=@"Please click on this message or post or link";
[FBSDKMessageDialog showWithContent:content delegate:self];
由于无法共享纯文本,我尝试用我的应用程序url-scheme替换contentURL,
content.contentURL =[NSURL URLWithString:@"fb1709123452649://"];
我收到错误:
错误发生:错误Domain = com.facebook.sdk.share Code = 2"(null)" 的UserInfo = {com.facebook.sdk:FBSDKErrorArgumentValueKey = fb1709123452649://, com.facebook.sdk:FBSDKErrorDeveloperMessageKey =无效的值 contentURL:fb1709123452649://, com.facebook.sdk:FBSDKErrorArgumentNameKey =的contentURL}
是否可以将应用网址转换为NSURL?