shareVideoToFacebookReels method

Future shareVideoToFacebookReels({
  1. required String? filePath,
  2. required String appId,
  3. required String fileProviderPath,
  4. String? dstPath,
  5. String? stickerPath,
  6. String? stickerTopBgColor,
  7. String? stickerBottomBgColor,
})

Share local video to Facebook reels method.

The method required a local video (filePath) file path, a Facebook app id (appId), and a custom file provider path (fileProviderPath => use on Android platform) to access the local file.

Besides, you can provide a dstPath to add a custom save folder path to cache the local file, sticker's top and bottom colors (stickerTopBgColor, stickerBottomBgColor) => Default color is #222222, and stickerPath to set the sticker asset for the video file.

Example with color:

OpenSocialShare.shareVideoToFacebookReelsAndroid(
  appId: 'your_facebook_app_id',
  filePath: 'your_image_file_path',
  stickerTopBgColor: '#33FF33',
  stickerBottomBgColor: '#FF00FF',
  dstPath: 'your_custom_save_folder_path',
  fileProviderPath: 'your_custom_fileProvider_path',
  stickerPath: 'your_sticker_file_path'
)

Working on: Android platform.

Implementation

Future<dynamic> shareVideoToFacebookReels({
  required String? filePath,
  required String appId,
  required String fileProviderPath,
  String? dstPath,
  String? stickerPath,
  String? stickerTopBgColor,
  String? stickerBottomBgColor,
}) async {
  return _channel.invokeMethod(
    'shareVideoFacebookReels',
    <String, dynamic>{
      'filePath': filePath,
      'stickerPath': stickerPath,
      'appId': appId,
      'fileProviderPath': fileProviderPath,
      'dstPath': dstPath,
      'stickerTopBgColor': stickerTopBgColor,
      'stickerBottomBgColor': stickerBottomBgColor,
    },
  );
}