shareMediaContentFileToFacebook method
Share local images and videos to Facebook method. The method required the local video (videoUrls
) and image (imageUrls
) file paths
and your custom file provider path fileProviderPath
(use on Android platform) to access the local file.
Besides, you can provide a dstPath
(Android platform) to add the custom save folder path to cache the local file,
and there are some other properties pageId
, peopleIds
, hashtag
, etc.
Working on: Android and iOS platforms.
Implementation
Future<dynamic> shareMediaContentFileToFacebook({
required String fileProviderPath,
List<String?>? videoUrls,
List<String?>? imageUrls,
String? dstPath,
String? pageId,
String? ref,
List<String>? peopleIds,
String? placeId,
String? hashtag,
String? contentUrl,
}) async {
assert(
imageUrls != null || videoUrls != null,
"Please provide at least one video list or one image list",
);
return _channel.invokeMethod(
'shareMediaContentFileFacebook',
<String, dynamic>{
'dstPath': dstPath,
'fileProviderPath': fileProviderPath,
'pageId': pageId,
'ref': ref,
'peopleIds': peopleIds,
'placeId': placeId,
'hashtag': hashtag,
'contentUrl': contentUrl,
'imageUrls': imageUrls,
'videoUrls': videoUrls,
},
);
}