shareStickerAssetToFacebookStory method
Share local sticker image to Facebook story method. The method required the local sticker image (stickerPath
) 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,
the sticker top and bottom colors stickerTopBgColors
, stickerBottomBgColors
(dedault color is #222222)
NOTE: On Android platform only a single color can be use for top and bottom of the sticker so the plugin will get the first color of the list on Android platform
Example with color:
OpenSocialShare.shareStickerAssetToFacebookStory(
appId: 'your_facebook_app_id',
stickerPath: 'your_image_path',
stickerTopBgColors: ['#33FF33'],
stickerBottomBgColors: ['#FF00FF'],
dstPath: 'your_custom_save_folder_path',
fileProviderPath: 'your_custom_fileProvider_path',
)
Working on: Android and iOS platforms.
Implementation
Future<dynamic> shareStickerAssetToFacebookStory({
required String appId,
required String fileProviderPath,
required String? stickerPath,
String? dstPath,
List<String>? stickerTopBgColors,
List<String>? stickerBottomBgColors,
}) async {
return _channel.invokeMethod(
'shareStickerAssetFacebookStory',
<String, dynamic>{
'appId': appId,
'fileProviderPath': fileProviderPath,
'stickerPath': stickerPath,
'dstPath': dstPath,
'stickerTopBgColors': stickerTopBgColors,
'stickerBottomBgColors': stickerBottomBgColors,
},
);
}