You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 9, 2024. It is now read-only.
The image is created and stored on the device. That part is no problem.
Sharing to other social media like instagram works fine.
Sharing to Facebook under Android works find.
Sharing to Facebook under iOS does not work.
here is the code related to the sharing part:
string imageName = $"IHaveBeenThere_{(int)rect.width}x{(int)rect.height}_{System.DateTime.Now}.png";
string filePath = Path.Combine(Application.temporaryCachePath, imageName);
File.WriteAllBytes(filePath, screenShot.EncodeToPNG());
NativeGallery.Permission permission = NativeGallery.SaveImageToGallery(screenShot, "I Have Been There", imageName, (success, path) => Debug.Log("Media save result: " + success + " " + path));
// To avoid memory leaks
Destroy(screenShot);
new NativeShare().AddFile(filePath)
.SetTitle("I Have Been There")
.SetSubject(gameName).SetText(shareMessage).SetUrl("https://chunhuacatherinedong.com/")
.SetCallback((result, shareTarget) => Debug.Log("Share result: " + result + ", selected app: " + shareTarget))
.Share();