Facebook

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. 

IOSSocialManager.OnFacebookPostResult += HandleOnFacebookPostResult;
void HandleOnFacebookPostResult (ISN_Result res) {
	if(res.IsSucceeded) {
		IOSNativePopUpManager.showMessage("Posting example", "Post Success!");
	} else {
		IOSNativePopUpManager.showMessage("Posting example", "Post Failed :(");
	}
}