shareBackgroundAssetFileToFacebookStory method

Future shareBackgroundAssetFileToFacebookStory({
  1. required String? filePath,
  2. required String appId,
  3. required String fileProviderPath,
  4. required AssetType fileType,
  5. String? dstPath,
})

Share local file to Facebook story method. The method required the local image (imagePath) file path, your Facebook app id (appId) and your custom file provider path (fileProviderPath) to access the local file on Android platform.

Besides, you can provide a dstPath to add the custom save folder path to cache the local file.

Working on: Android and iOS platforms.

Implementation

Future<dynamic> shareBackgroundAssetFileToFacebookStory({
  required String? filePath,
  required String appId,
  required String fileProviderPath,
  required AssetType fileType,
  String? dstPath,
}) async {
  assert(
    fileType == AssetType.video || fileType == AssetType.image,
    "Only video and image types are supported",
  );

  return _channel.invokeMethod(
    'shareBackgroundAssetFileFacebookStory',
    {
      'fileType': fileType.name,
      'filePath': filePath,
      'appId': appId,
      'fileProviderPath': fileProviderPath,
      'dstPath': dstPath,
    },
  );
}