how i can share my screenshot in base64 data to facebook using Unity ??

i want to share screenshot to facebook in unity. when i run my app in facebook instant game and try to share a screenshot i get an error "picture should represent a valid url facebook".

public void Share() { StartCoroutine(Run());

} IEnumerator Run() { yield return new WaitForEndOfFrame();

Texture2D tex = new Texture2D(Screen.width, Screen.height);
tex.ReadPixels(new Rect(0, 0, Screen.width, Screen.height), 0, 0);

string link = "data:image/png;base64," + Convert.ToBase64String(tex.EncodeToPNG());
Debug.Log(new Uri(link).OriginalString);

FB.FeedShare(link: new Uri(""),
    picture: new Uri(link),


Asked about 2 months ago