2

I am trying to share a Link of webpage on LinkedIn from my Flutter app, I have created below function for that:

void _shareOnLinkedIn() async {
final String linkedInShareUrl =
    "https://stgappnavigator.parkstreet.com/marketplace/details/${_catalogStore.summaryInfo?.data?[widget.productIndex].id}";
final String encodedUrl = Uri.encodeFull(linkedInShareUrl);
final String linkedInUrl = Const.linkedInShareUrl + "=$encodedUrl";
if (await canLaunchUrl(Uri.parse(linkedInUrl))) {
  await launchUrl(Uri.parse(linkedInUrl));
} else {
  ToastUtil.show(
      ToastDecorator(isSuccess: false, msg: "something_went_wrong".tr()),
      context,
      gravity: ToastGravity.bottom);
    }
}

Now, Its working fine but the result which I am getting is different on LinkedIn in case of Web and Mobile..i.e. While Sharing from Web and from Mobile It shares the same String value of the Link but it looks different on LinkedIn as below:

enter image description here

The Blue text is the result of Sharing from Mobile and The second one is the same link which is shared from web but it looks different.

The Link value is the same even though why is it looking different on LinkedIn.

Please guide.

Note that the value of linkedInShareUrl variable is : https://www.linkedin.com/sharing/share-offsite/?url

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.