I found another good example, setGUItexture so i copy and paste it.
It look like works fine just like attached screenshot, but somehow my custom action only paste blue screen on facebook instead of picture that i attached.
Here is my whole custom action stuff.
What i've tried to with this custom action is
1. attached pic in playmaker fsm, that i want to paste.
2. convert that picture into png then byte.
3. upload to face book.
using UnityEngine;
using System.Collections;
using System.IO;
using HutongGames.PlayMaker;
using System.Collections.Generic;
[ActionCategory("facebook")]
public class FB_PHOSTPIC : FsmStateAction
{
#region Fields
private static string appID = ".....";
[UIHint(UIHint.Variable)]
[RequiredField]
public FsmOwnerDefault gameObject;
public FsmTexture image;//public string message;
private byte upload;
#endregion
// Code that runs on entering the state.
public override void OnEnter()
{
Texture2D image = new Texture2D(Screen.width,Screen.height,TextureFormat.RGB24,false);
//image.ReadPixels(new Rect(0,0,Screen.width,Screen.height),0,0);
image.Apply();
byte[] bytes = image.EncodeToPNG();
FacebookUnityPlugin.PostPhoto(bytes);
}