Exemple #1
0
        public override void SetPlatformConfig(Hashtable configs)
        {
            String json = MiniJSON.jsonEncode(configs);

            __iosShareSDKRegisterAppAndSetPltformsConfig(_appKey, json);
        }
 public static Hashtable hashtableFromJson(this string json)
 {
     return(MiniJSON.jsonDecode(json) as Hashtable);
 }
Exemple #3
0
        public override void ShowShareContentEditorWithContentName(int reqId, PlatformType platform, string contentName, Hashtable customFields)
        {
            String customFieldsStr = MiniJSON.jsonEncode(customFields);

            __iosShareSDKShowShareViewWithContentName(reqId, (int)platform, contentName, customFieldsStr, _callbackObjectName);
        }
 public static ArrayList arrayListFromJson(this string json)
 {
     return(MiniJSON.jsonDecode(json) as ArrayList);
 }
 public static string toJson(this Dictionary <string, string> obj)
 {
     return(MiniJSON.jsonEncode(obj));
 }
 public static string toJson(this Hashtable obj)
 {
     return(MiniJSON.jsonEncode(obj));
 }
Exemple #7
0
        /// <summary>
        /// Raises the success event.
        /// </summary>
        /// <param name="platform">Platform.</param>
        /// <param name="action">Action.</param>
        /// <param name="res">Res.</param>
        public void OnComplete(int reqID, PlatformType platform, int action, Hashtable res)
        {
            Debug.Log("Oncomplete : reqID:" + reqID.ToString() + " platform: " + platform.ToString() + " action" + action.ToString() + " res:" + MiniJSON.jsonEncode(res));
            switch (action)
            {
            case 1:
            {             // 1 == Platform.ACTION_AUTHORIZING
                Debug.Log("登录函数回调!");
                if (authHandler != null)
                {
                    authHandler(reqID, ResponseState.Success, platform, res);
                }
                break;
            }

            case 2:
            {             //2 == Platform.ACTION_GETTING_FRIEND_LIST
                if (getFriendsHandler != null)
                {
                    getFriendsHandler(reqID, ResponseState.Success, platform, res);
                }
                break;
            }

            case 6:
            {             //6 == Platform.ACTION_FOLLOWING_USER
                if (followFriendHandler != null)
                {
                    followFriendHandler(reqID, ResponseState.Success, platform, res);
                }
                break;
            }

            case 8:
            {             // 8 == Platform.ACTION_USER_INFOR
                if (showUserHandler != null)
                {
                    showUserHandler(reqID, ResponseState.Success, platform, res);
                }
                break;
            }

            case 9:
            {             // 9 == Platform.ACTION_SHARE
                if (shareHandler != null)
                {
                    shareHandler(reqID, ResponseState.Success, platform, res);
                }
                break;
            }
            }
        }
Exemple #8
0
        /// <summary>
        /// Sets the platform config.
        /// </summary>
        /// <param name="platform">Platform.</param>
        /// <param name="configs">Configs.</param>
        public void setPlatformConfig(int platform, Hashtable configs)
        {
            String json = MiniJSON.jsonEncode(configs);

            ssdk.CallStatic("setPlatformConfig", platform, json);
        }