FBSDKShareLinkContent without deep application binding

I use FBSDKShareLinkContentto display a dialog to share a link on Facebook. No matter which link I use (I even tried with https://google.com/ ) when the message / link is used in the Facebook application that launches my application.

However, I want to download the link in a web browser or in the FB browser (and not start my application or go to the application store). Anyway, for this? I tried both FBSDKShareDialogModeFeedWeb, and FBSDKShareDialogModeAutomatic.

Here is my current code:

FBSDKShareLinkContent *content = [[FBSDKShareLinkContent alloc] init];
content.contentURL = [NSURL URLWithString:@"https://google.com/"];

FBSDKShareDialog* dialog = [[FBSDKShareDialog alloc] init];
dialog.mode = FBSDKShareDialogModeFeedWeb;
dialog.shareContent = content;
dialog.fromViewController = self;
[dialog show];
+4
source share
1 answer

Add this to your code:

FBSDKShareLinkContent *content1 = [[FBSDKShareLinkContent alloc] init];
content1.contentURL = [NSURL URLWithString:@"http://en.wikipedia.org/wiki/Facebook"];
content1.contentTitle=@"Share";
[FBSDKShareDialog showFromViewController:self withContent:content1 delegate:nil];
+1

Source: https://habr.com/ru/post/1659005/


All Articles