Before you start:

  • The Facebook SDK for Unity only supports iOS version 7.0 and above.

The code  snippet below will demonstrate Facebook posting example:

Texture2D tex = new Texture2D( width, height, TextureFormat.RGB24, false );
IOSSocialManager.Instance.FacebookPost("My app Screenshot", null, tex);

We can also find out posting result by subscribing to the OnFacebookPostResult action. 

public void PostScreenshot() {
    Facebook.Post("My app Screnshot", arr, HandleOnFacebookPostResult);      

void HandleOnFacebookPostResult (SA.Common.Models.Result res) {
	if(res.IsSucceeded) {
		IOSNativePopUpManager.showMessage("Posting example", "Post Success!");
	} else {
		IOSNativePopUpManager.showMessage("Posting example", "Post Failed :(");