public void PostPhoto(string message, Texture2D texture, Facebook.PostPhotoDelegate callback)
        {
            byte[] bytes     = texture.EncodeToPNG();
            string imagePath = null;

            imagePath = Application.temporaryCachePath + "/PostPhoto.png";
            File.WriteAllBytes(imagePath, bytes);
            int handlerNum = facebookCallback.SetPostPhotoCallback(callback);

            nmg_facebook_postPhoto(message, imagePath, handlerNum);
        }
Beispiel #2
0
        public void PostPhoto(string message, Texture2D texture, Facebook.PostPhotoDelegate callback)
        {
            byte[] bytes     = texture.EncodeToPNG();
            string imagePath = null;

            imagePath = Application.persistentDataPath + "/PostPhoto.png";
            File.WriteAllBytes(imagePath, bytes);

            int handlerNum = facebookCallback.SetPostPhotoCallback(callback);

            facebookAndroidClass.CallStatic("nmg_facebook_postPhoto", message, imagePath, handlerNum);
        }
        public int SetPostPhotoCallback(Facebook.PostPhotoDelegate callback)
        {
            if (null == callback)
            {
                return(0);
            }

            int handlerNum = CallbackManager.AddHandler(delegate(CallbackMessage message)
            {
                Log.Debug("[FacebookCallback] PostPhotoCallback: " + message);

                Result result = message.GetResult();

                if (null != callback)
                {
                    callback(result);
                }
            });

            return(handlerNum);
        }
Beispiel #4
0
 public void PostPhoto(string message, Texture2D texture, Facebook.PostPhotoDelegate callback)
 {
 }