shareLinkContentToFacebook method

Future shareLinkContentToFacebook({
  1. String? contentUrl,
  2. String? pageId,
  3. String? ref,
  4. List<String>? peopleIds,
  5. String? placeId,
  6. String? hashtag,
  7. String? quote,
})

Share a link content to your Facebook feed method. You can provide a link of the content you want to share using contentUrl property.

There are some other properties pageId, peopleIds, hashtag, etc.

Working on: Android and iOS platforms.

Implementation

Future<dynamic> shareLinkContentToFacebook({
  String? contentUrl,
  String? pageId,
  String? ref,
  List<String>? peopleIds,
  String? placeId,
  String? hashtag,
  String? quote,
}) async {
  if (contentUrl != null && !Uri.parse(contentUrl).isAbsolute) {
    return 'This is an invalid URL!';
  }

  return _channel.invokeMethod(
    'shareLinkContentFacebook',
    <String, dynamic>{
      'pageId': pageId,
      'ref': ref,
      'peopleIds': peopleIds,
      'placeId': placeId,
      'hashtag': hashtag,
      'contentUrl': contentUrl,
      'quote': quote,
    },
  );
}