2

We can post the link content by using the code:

 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];

As sharing the plain text is not possible I tried to replace the contentURL with my app url-scheme,

  content.contentURL =[NSURL URLWithString:@"fb1709123452649://"];

and I get the error:

Error Occured:Error Domain=com.facebook.sdk.share Code=2 "(null)" UserInfo={com.facebook.sdk:FBSDKErrorArgumentValueKey= fb1709123452649://, com.facebook.sdk:FBSDKErrorDeveloperMessageKey=Invalid value for contentURL: fb1709123452649://, com.facebook.sdk:FBSDKErrorArgumentNameKey=contentURL}

Is it possible to convert the app url to NSURL ?

Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109

0 Answers0