And after the setup is complete you can use the helper class as:
publicclassDemoSceneScript:MonoBehaviour{publicFacebookStoryShareHelper facebookStoryShareHelper; // Share image to Facebook Story by providing the path to the image filepublicvoidShareImageToStory() {facebookStoryShareHelper.ShareImageToFacebookStory(_imageFilePath); } // Share image & sticker to Facebook Story by providing file pathspublicvoidShareImageAndStickerToStory() {facebookStoryShareHelper.ShareImageWithStickerToFacebookStory(_imageFilePath, _stickerFilePath); } // Share image with gradient to Facebook Story by providing file paths and color valuespublicvoidShareImageWithGradientToStory() {facebookStoryShareHelper.ShareStickerWithGradientToFacebookStory(_imageFilePath,"#CC3322","#99AE32"); } // Share video to Facebook Story by providing file pathpublicvoidShareVideo() {facebookStoryShareHelper.ShareVideoToFacebookStory(_videoFilePath); } // Share video & sticker to Facebook Story by providing file pathspublicvoidShareVideoWithSticker() {facebookStoryShareHelper.ShareVideoWithStickerToFacebookStory(_videoFilePath, _stickerFilePath); } // Share video to Facebook Reel by providing file pathpublicvoidShareVideoReel() {facebookStoryShareHelper.ShareVideoReel(_videoFilePath); } // Share video & sticker to Facebook Reel by providing file pathpublicvoidShareVideoReelWithSticker() {facebookStoryShareHelper.ShareVideoReelWithSticker(_videoFilePath, _stickerFilePath); }}
Build Errors
If you encounter an issue: unexpected element <queries> found in <manifest>
There is an easy fix for that: go to File -> Build Settings -> Player Settings -> Publishing Settings and select Custom Base Gradle Template. After that open the generated file baseProjectTemplate.gradle under Assets/Plugins/Android folder and change com.android.tools.build:gradle:*** to