title: Using Facebook SDK to Upload Screenshot in Unity
body: <p>I'm am trying to use Facebook SDK to Upload Screenshots to Facebook using <code>FB.Feed()</code> instead of <code>FB.API()</code> so that users can write a message to their post. I was able to get this to work on Unity Editor but when I try it on my Android, I get:</p>
  
  <blockquote>
    <p>"This dialog has been passed a bad parameter.</p>
    
    <p>API Error Code: 100 <br>
    API Error Description: Invalid parameter<br>
    Error Message: picture URL is not properly formatted"</p>
  </blockquote>
  
  <p>And here is the code I wrote:</p>
  
  <pre><code>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();
  File.WriteAllBytes(Application.persistentDataPath + "/Screenshot.png", screenshot);
  
  //Application.CaptureScreenshot(Application.persistentDataPath + "/Screenshot.png");
  Debug.Log(Application.persistentDataPath + "/Screenshot.png");
  Debug.Log("Does File Exist? " + File.Exists(Application.persistentDataPath + "/Screenshot.png"));
  Debug.Log("File://" + Application.persistentDataPath + "/Screenshot.png");
  FB.Feed(
      picture: "File://" + Application.persistentDataPath + "/Screenshot.png"
  );
  </code></pre>