I am trying to get my application (iOS, Android) so that users can post a screenshot to facebook with a link and description. I can use FB.API () to upload screenshots from my application to the user album that Facebook was created for my application through:
int width = Screen.width; int height = Screen.height; Texture2D 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(); string picName = "Idioman_" + Time.time + ".png"; wwwForm.AddBinaryData("image", screenshot, picName); Debug.Log("trying to post screenshot"); FB.API("me/photos", Facebook.HttpMethod.POST, PostPicCallback, wwwForm);
And I can use FB.Feed () to publish an image from the Internet with a link and description in the user's feed. Is there a way to post a screenshot in the user's feed with a link and description?
source share