I created a Game on Unity3D and I am in the process of adding support for Facebook. What I would like to achieve is the users posting a screenshot of the game showing the score. I succeeded technically, but Facebook rejected my game because the text message that is posted along with the picture is pre-filled, and that violates section 2.3 of their Platform Policy.
Here is a pice of code found on the Example that comes with Facebook SDK for Unity in which I based mine... I guess this sample code created by Facebook does not comply either.
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", "herp derp. I did a thing! Did I do this right?");
FB.API("me/photos", Facebook.HttpMethod.POST, Callback, wwwForm);
}
So before investing a lot of time implementing a text editor in Unity3D for the sole purpose of posting to Facebook, I am looking for advise.
First, is there a way I can get my app approved without creating a text editor at all?
1) If I just post the screenshot will Facebook approve my game? Or I still will get rejected for posting a pre-filled image?
2) Is there a way to achieve this without creating an App on Facebook and requesting approval for "publish_actions" permission? maybe passing the image to the Facebook App?
If there is no option and I must create a text editor with a touch keyboard to allow the user to edit the message, what would be the best way to do it keeping compatibility for iOS, Android and Windows Phone 8.