sendMessageToMessenger method

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

Send text message (on Android) and link content (on iOS) to Messenger method. The method required a message string.

There are some other properties for iOS: pageId, peopleIds, hashtag, etc.

NOTE: On iOS a message can only be a link due to Facebook's policy.

Working on: Android and iOS platforms.

Implementation

Future<dynamic> sendMessageToMessenger({
  required String message,
  String? pageId,
  String? ref,
  List<String>? peopleIds,
  String? placeId,
  String? hashtag,
  String? quote,
}) async {
  return _channel.invokeMethod(
    'sendMessageMessenger',
    <String, dynamic>{
      'message': message,
      'pageId': pageId,
      'ref': ref,
      'peopleIds': peopleIds,
      'placeId': placeId,
      'hashtag': hashtag,
      'quote': quote,
    },
  );
}