- Home /
 
Facebook SDK FB.API post screenshot with user's message
Hi, I'm trying to post a screenshot and upload it to the user's facebook account. I'm using facebook SDK and it's working fine with the example code i got from their Docs and i even managed to "pre-fill" a message and post it with the screenshot. But pre-filling a message is against Facebook Platform Policy, so i'm looking for a way to use the same method and let the user fill in a message while i don't break Facebook Platform Policy.
 private IEnumerator TakeScreenshot()
 {
     yield return new WaitForEndOfFrame();
  
     var width = Screen.width;
     var height = Screen.height;
     var tex = new Texture2D(width, height, TextureFormat.RGB24, false);
     // Read screen contents into the texture
     tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
     tex.Apply();
     byte[] screenshot = tex.EncodeToPNG();
  
     var wwwForm = new WWWForm();
     wwwForm.AddBinaryData("image", screenshot, "InteractiveConsole.png");
     wwwForm.AddField("message","some message"); // violating Facebook Platform Policy
     FB.API("me/photos", Facebook.HttpMethod.POST, Callback, wwwForm);
 }
 
              
               Comment
              
 
               
              Your answer